Skip to main content
Glama

fetch

Retrieve a record previously cached by the search tool in the same session. Use this to access past search results without 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?

No annotations exist, so the description fully discloses behavior: it only returns cached records, does not make direct API calls, and returns 'Record not found' if not cached. This is comprehensive.

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?

The description is well-structured with clear sections (main statement, limitations, alternatives, args, returns). It is front-loaded and every sentence adds value, though slightly verbose in the limitations part.

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?

For a single-parameter tool with an output schema (implied), the description covers the essential constraint (caching requirement) and return behavior. It is complete given the tool's simplicity.

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 description adds substantial meaning beyond the input schema: it specifies the required format ('type:id') and the constraint that the ID must have been returned by a previous 'search' call. Since schema coverage is 0%, this fully compensates.

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 tool clearly states its purpose: 'Fetch a record previously returned by the 'search' tool in the same session.' It specifies the verb (Fetch), resource (cached record), and 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?

Explicit guidance is provided: when to use (after a 'search' call), when not to use (for direct lookups by ID), and alternatives are named (get_campaign_details, get_adset_details, etc.). This meets the highest standard.

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