> ## Documentation Index
> Fetch the complete documentation index at: https://docs.jelou.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Jelou Functions

> Serverless TypeScript functions: HTTP endpoints, Zod validation, MCP tools, and multi-tool with app() — all automatic.

<Warning>
  **Preview** — Jelou Functions is in preview. The API and behavior may change without prior notice. Do not use it in critical production flows without contacting the support team.
</Warning>

<Info>
  **How to get your token?**

  * **Enterprise customers:** the token must be requested from the Jelou technical support team.
  * **Self-service customers:** you can generate your own token from [Authentication](/en/guides/functions/autenticacion).
</Info>

## What is Jelou Functions?

Jelou Functions is a serverless TypeScript platform where with `define()` you automatically get:

* **HTTP endpoint** ready to receive requests
* **Validation** of input and output with Zod
* **MCP tool** so your AI agents can invoke it directly
* **Declarative cron jobs** without additional infrastructure
* **Multi-tool** with `app()` to group multiple tools in a single deployment

```typescript index.ts theme={null}
import { define, z } from "@jelou/functions";

export default define({
  name: "query-customer",
  description: "Looks up customer information by phone number",
  input: z.object({
    phone: z.string().min(10),
  }),
  output: z.object({
    name: z.string(),
    plan: z.string(),
  }),
  handler: async (input, ctx) => {
    ctx.log("Looking up customer", { phone: input.phone });
    return { name: "Maria Garcia", plan: "Premium" };
  },
});
```

Deploy with a single command and get a production URL:

```bash theme={null}
jelou functions deploy
# → https://query-customer.fn.jelou.ai
```

## What is it for?

<CardGroup cols={1}>
  <Card title="Tools for AI agents" icon="robot" href="/guides/functions/mcp">
    Create tools that your WhatsApp agents can invoke: query data, process payments, check statuses.
  </Card>

  <Card title="Webhooks and APIs" icon="webhook" href="/guides/functions/validacion">
    Receive callbacks from payment gateways, CRMs, or any external service with automatic validation.
  </Card>

  <Card title="Scheduled tasks" icon="clock" href="/guides/functions/cron">
    Run recurring tasks like sending reminders, syncing data, or cleaning up inactive sessions.
  </Card>

  <Card title="Instant deployment" icon="rocket" href="/guides/functions/despliegue">
    From local code to production in seconds, with rollback included and CI/CD support.
  </Card>

  <Card title="Multi-tool functions" icon="layer-group" href="/guides/functions/multi-tool">
    Group multiple tools in a single deployment with `app()`: auto-generated routes, unified MCP, and independent cron.
  </Card>
</CardGroup>

## Prerequisites

Before you start, make sure you have:

* **Node.js 18+** installed
* Your Jelou account with access to Functions
* Your personal access token (prefix `jfn_pat_`)

## Next step

<Card title="Quick start" icon="play" href="/guides/functions/quickstart">
  Create, test, and deploy your first function in less than 5 minutes.
</Card>
