---
title: Meta
description: Meta supplies typed data about a definition to wrap and integrations.
---

Meta is app-defined data about a definition, such as a tag or an AI tool description.

<Diagram caption="The same meta can give wrap a tag and give an AI tool a description.">
  <Fan>
    <Node slot="from" title="meta" subtitle="Data on the function" tone="accent" />
    <Node title="wrap" subtitle="Reads the call metadata" />
    <Node title="toAITool" subtitle="Reads the tool description" />
  </Fan>
</Diagram>

```ts twoslash
import { init } from "logic-sdk";
import type { AIMeta } from "logic-sdk/ai";

const anyone = () => true;
// ---cut---
const { query, createRegistry } = init<{
  scope: { accountId: string };
  meta: AIMeta & { tags?: string[] };
}>();

/** List the guest's bookings. */
const list = query({
  authorize: anyone,
  meta: { tags: ["bookings"], ai: { description: "Use when asked to list bookings" } },
  async handler() {
    return [];
  },
});

createRegistry({
  modules: { bookings: { list } },
  wrap: async (call, next) => {
    console.log(call.id, call.meta?.tags);
    return next();
  },
});
```

- **Shape.** Declare the `meta` shape in `init`. Include the types your integrations read, such as `AIMeta`.
- **Tracing (1).** `wrap` receives typed `call.meta`, even when validation or policy blocks the call. A job's own call gets `call.job` with its ID and attempt. Nested calls omit it.
- **Integrations (2).** Use one key per integration. Use JSDoc for readers and the CLI.

## See also

[Functions](/docs/concepts/functions), [AI](/docs/guides/ai), [API reference](/docs/reference/api)
