Skip to main content
Glama

get_canvas

Retrieve details of an Instant Experience (Canvas) by providing its ID. Specify optional fields to customize the returned data.

Instructions

Get details of a specific Instant Experience (Canvas) by ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
canvas_idYesCanvas ID
fieldsNoComma-separated fields to return

Implementation Reference

  • The 'get_canvas' tool handler: an async function registered with server.tool() that takes canvas_id and optional fields, builds query params, calls client.get(`/${canvas_id}`) to fetch a specific Canvas by ID from the Meta Ads API, and returns the response JSON with rate limit info.
    server.tool(
      "get_canvas",
      "Get details of a specific Instant Experience (Canvas) by ID.",
      {
        canvas_id: z.string().describe("Canvas ID"),
        fields: z.string().optional().describe("Comma-separated fields to return"),
      },
      async ({ canvas_id, fields }) => {
        try {
          const params: Record<string, unknown> = {};
          if (fields) params.fields = fields;
          const { data, rateLimit } = await client.get(`/${canvas_id}`, 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 get_canvas: requires 'canvas_id' (z.string) and optional 'fields' (z.string).
    {
      canvas_id: z.string().describe("Canvas ID"),
      fields: z.string().optional().describe("Comma-separated fields to return"),
    },
  • src/index.ts:58-58 (registration)
    Registration call: registerCanvasTools(server, client) wires the tool into the MCP server.
    registerCanvasTools(server, client);
  • The AdsClient.get() convenience method used by the handler to make the GET request to the Meta Ads API.
    async get(
      path: string,
      params?: Record<string, unknown>
    ): Promise<ClientResponse> {
      return this.request("GET", path, params);
    }
Behavior3/5

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

The description indicates a read-only operation ('Get details'). With no annotations provided, the description carries the behavioral disclosure burden. It adequately conveys that the tool has no side effects, but no additional context (e.g., rate limits, response size) is given.

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

Conciseness5/5

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

The description is a single sentence with 13 words, conveying all essential information without any wasted words. It is front-loaded with the action and resource.

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

Completeness4/5

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

For a simple retrieval tool with two parameters and no output schema, the description provides sufficient information. It clearly identifies the resource and how to specify it. Could optionally mention return format, but not necessary given low complexity.

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 description coverage is 100%, so each parameter already has a description. The tool description adds no extra meaning beyond what is in the schema. Baseline score of 3 is appropriate.

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?

The description clearly states the verb 'Get', the resource 'Instant Experience (Canvas)', and the identifier 'by ID'. This distinguishes it from sibling tools like create_canvas, delete_canvas, and list_canvases.

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

Usage Guidelines3/5

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

The description implies usage for retrieving a single canvas by ID, but does not explicitly state when to use this tool versus alternatives like list_canvases. No guidelines about prerequisites or exclusions are provided.

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