Skip to main content
Glama
pralayasimha23

meta-ads-mcp

fetch

Retrieve cached records from a prior search in the same session. Use after search to access detailed data without making additional API calls.

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 provided, the description carries full burden. It discloses that the tool does not make direct API calls, only returns cached records, and returns 'Record not found' if the record wasn't cached. It also notes the session scoping, providing essential behavioral context.

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 clear sections: main purpose, important limitations, alternatives, args, and returns. Every sentence provides necessary information, and the key limitation is front-loaded. Length is justified by the complexity and requirement to prevent misuse.

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?

Despite having an output schema, the description explains the return behavior ('JSON response with record data, or 'Record not found''), which is essential. It covers the single parameter, use cases, limitations, and alternatives, making it complete for this relatively simple tool.

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?

The input schema only lists an 'id' string with no description. The description adds critical meaning: the required format ('type:id', e.g., 'account:act_123456') and that the record must have been returned by a previous 'search' call. This is substantial value beyond the schema.

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 states a specific verb ('Fetch') and resource ('a record previously returned by the 'search' tool'), clearly distinguishing this from sibling tools. It explicitly notes this is not for direct ID lookups, which further sharpens its purpose.

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 states when to use the tool (after a prior 'search' call) and when NOT to use it ('Do NOT use this tool to look up campaigns, adsets, or ads by ID directly'), and then lists specific alternative tools for those cases. This is model guidance.

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

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