Skip to main content
Glama

send_offline_event

Send offline conversion events to an offline event set for tracking and attribution.

Instructions

Send an offline conversion event to an offline event set.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
event_set_idYesOffline event set ID
eventsYesJSON array of offline events

Implementation Reference

  • The handler function for the 'send_offline_event' tool. It destructures event_set_id from params and posts to /{event_set_id}/events via the AdsClient. Error handling returns structured error content.
    // ─── send_offline_event ────────────────────────────────────
    server.tool(
      "send_offline_event",
      "Send an offline conversion event to an offline event set.",
      {
        event_set_id: z.string().describe("Offline event set ID"),
        events: z.string().describe("JSON array of offline events"),
      },
      async ({ event_set_id, ...params }) => {
        try {
          const { data, rateLimit } = await client.post(`/${event_set_id}/events`, { ...params });
          return { content: [{ type: "text" as const, text: JSON.stringify({ ...data as object, _rateLimit: rateLimit }, null, 2) }] };
        } catch (error) {
          return { content: [{ type: "text" as const, text: `Failed: ${error instanceof Error ? error.message : String(error)}` }], isError: true };
        }
      }
    );
  • Input schema for send_offline_event: requires event_set_id (string) and events (string - JSON array of offline events).
    {
      event_set_id: z.string().describe("Offline event set ID"),
      events: z.string().describe("JSON array of offline events"),
  • Registration function: registerConversionTools is exported and called from src/index.ts (line 79) with the server and client instances.
    export function registerConversionTools(server: McpServer, client: AdsClient): void {
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided; description only states the action without disclosing behavioral traits like idempotency, success/failure responses, or rate limits. Minimal transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single sentence is concise and front-loaded. Could benefit from additional detail but avoids unnecessary verbosity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, description fails to specify the structure of the events JSON array or error conditions. Incomplete for a send operation with two required parameters.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and description adds no extra meaning beyond the parameter descriptions in the schema. Baseline score applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description uses specific verb 'send' and distinct resource 'offline conversion event' to an 'offline event set.' Clearly distinguishes from sibling tools like 'create_offline_event_set' and 'send_conversion_event'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives like 'send_conversion_event.' Also lacks prerequisites such as requiring an existing offline event set.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mikusnuz/meta-ads-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server