Skip to main content
Glama
OrbiAds

OrbiAds

Official

pql

Execute PQL queries on Google Ad Manager reporting tables to extract custom data not available in structured reports. Returns rows with column definitions.

Instructions

Execute PQL (Publisher Query Language) queries against GAM reporting tables.

MODE: read-only AUTH: OAuth 2.0 required CREDITS: 0 (free) OUTPUT: Returns a ResultSet with column definitions and rows. Each row is an array of values matching the column order. WHEN TO USE: Use pql for ad-hoc data extraction not covered by the reporting tool's structured reports. LIMITATIONS: Not all PQL tables are available on all networks (some require beta features). The Language and Device_Category tables have known limitations. For structured delivery/inventory reports, use reporting instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYesSub-operation to perform: • run_query: Execute a PQL SELECT statement. Example: SELECT Id, Name FROM Order WHERE Status = 'DELIVERING'. Returns rows up to 1000 per call.
pql_queryNoPQL SELECT statement. Supported tables: Order, LineItem, Creative, AdUnit, Placement, Company, User, and others. Max 1000 rows returned.
network_codeNoGAM network code (e.g. 12345678). Required for all network-scoped operations. Obtain via select_gam_network or list_accessible_networks.
Behavior4/5

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

With no annotations, the description carries full burden. It declares read-only mode, OAuth 2.0 requirement, zero credits, and a clear output format (ResultSet with columns and rows). It also states a 1000-row limit. Minor omission: no mention of error handling or timeouts.

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 labeled sections (MODE, AUTH, CREDITS, OUTPUT, WHEN TO USE, LIMITATIONS) and front-loaded with the main purpose. Every sentence adds information; no redundancy.

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?

The tool has 3 parameters and no output schema. The description covers return format, row limit, table references, and alternatives. It could mention pagination or that queries must be SELECT-type, but the read-only flag implies that. Sufficient for the given complexity.

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 100%, so baseline is 3. The description adds value beyond schema by listing supported tables (Order, LineItem, etc.), providing an example query, and explaining the network_code parameter's scope. This incrementally aids understanding.

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 'Execute PQL queries against GAM reporting tables' with a specific verb and resource. It differentiates from siblings like 'reporting' by stating it's for ad-hoc extraction not covered by structured reports, and explicitly directs users to 'reporting' for structured reports.

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 provides explicit when-to-use ('ad-hoc data extraction not covered by the reporting tool's structured reports') and when-not-to-use ('For structured delivery/inventory reports, use reporting instead'). It also lists limitations about table availability and known table issues.

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/OrbiAds/Orbiads-GAM-MCP'

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