Skip to main content
Glama

OpenAI Ads MCP by InsightfulPipe

OpenAI Ads Data Query

query_data
Read-only

Query OpenAI Ads data (Step 3 (FINAL) of workflow).

REQUIRED: Complete these steps first using query_contexts:

  1. request='accounts' - Get workspace_id, brand_id, ad_account_id AND available_actions

  2. request='actions_details' with actions=['xxxxxx', 'xxxxxx', 'xxxxxx'] - Get detailed body structure for specific action(s) using actions from available_actions

IMPORTANT: Always call step 2 to see the exact body structure before querying.

Rely on info from steps 1-2 to construct the query body. Follow the schema exactly.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "body": "<body>"
    },
    "name": "query_data"
  }
}

Input Schema

NameRequiredDescriptionDefault
bodyYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior3/5

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

readOnlyHint=true and openWorldHint=true already carry the safety and scope profile. The description adds procedural sequencing but nothing about execution behavior: no statement of what happens if the body is malformed, no error or rate-limit expectations, and no hint that an opaque 'body' is being submitted for what the annotations call a read-only operation.

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?

Front-loaded with the workflow step, then a numbered prerequisite list, then the imperative instruction. Every sentence is actionable and there is no filler; even the xxxxxx placeholders usefully signal that action names are variable.

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?

An output schema exists, so return values need not be explained, and the prerequisite chain covers the biggest risk (an unconstructable body). The remaining gap is that for a tool whose entire input is opaque, one concrete example body or a pointer to what 'query data' can express would close the loop.

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

Parameters4/5

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

Schema coverage is 0% and the single `body` parameter is an untyped free-form object with additionalProperties=true, so the schema alone tells an agent nothing. The description compensates meaningfully by telling the agent exactly where to derive the body shape (query_contexts/actions_details) and to "Follow the schema exactly", though it supplies no example body itself.

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

Purpose4/5

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

States a verb and resource ("Query OpenAI Ads data") and positions itself as step 3 (FINAL) of a workflow, which helps an agent place it. However, it never says what kind of data is returned (campaign metrics, entities, reports) and never contrasts itself with the sibling execute_action, which likely also hits the ads API.

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

Usage Guidelines4/5

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

Gives an explicit, ordered precondition chain: call query_contexts with request='accounts' first, then request='actions_details' with the actions harvested from available_actions, and it stresses "Always call step 2" before querying. What is missing is any when-not guidance, e.g. when a task should go to execute_action rather than this read path.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.