Skip to main content
Glama

fetch

Retrieve a record previously returned by a 'search' call within the same session.

Instructions

Fetch a record previously returned by the 'search' tool in the same session.

IMPORTANT LIMITATIONS:
- This tool ONLY returns records that were cached by a prior 'search' call.
  It does NOT make direct API calls to Meta. If the record was not found by
  'search' first, this tool will return "Record not found".
- Do NOT use this tool to look up campaigns, adsets, or ads by ID directly.

For direct lookups by ID, use these tools instead:
- get_campaign_details(campaign_id=...) - for campaigns
- get_adset_details(adset_id=...) - for ad sets
- get_ads(account_id=..., campaign_id=...) - for ads
- get_adsets(account_id=..., campaign_id=...) - for ad sets in a campaign

Args:
    id: The record ID to fetch (format: "type:id", e.g., "account:act_123456").
        Must have been returned by a previous 'search' call.

Returns:
    JSON response with record data, or "Record not found" if the record
    was not previously cached by 'search'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

With no annotations, the description fully discloses behavior: no direct API calls, only cached records from search. It details return values ('Record not found') and the caching constraint.

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 well-structured with sections, front-loads the core function, and every sentence adds value. No unnecessary text.

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

Completeness5/5

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

Given the single parameter and presence of an output schema, the description covers behavior, constraints, and alternatives completely. It leaves no gaps.

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

Parameters5/5

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

Schema coverage is 0%, but the description compensates fully by explaining the 'id' parameter format ('type:id') and requirement that it must come from a previous search.

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 tool fetches a record previously returned by 'search', specifying the verb and resource. It distinguishes from siblings by listing alternative tools for direct lookups.

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

Usage Guidelines5/5

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

The description explicitly warns not to use for direct ID lookups and provides specific alternative tools for campaigns, adsets, and ads. It also explains the prerequisite of a prior 'search' call.

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/pipeboard-co/meta-ads-mcp'

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