Skip to main content
Glama
mkroo
by mkroo

get_ad_code

Retrieve the HTML/JS ad code for any AdSense ad unit, ready to paste into your website.

Instructions

Get the HTML/JS ad code snippet for an ad unit, ready to paste into your website

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
adUnitYesFull ad unit name (e.g., accounts/pub-XXX/adclients/ca-pub-XXX/adunits/123)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.1/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It only states that the tool retrieves an HTML/JS snippet, implying a read operation, but does not disclose authentication needs, error conditions, whether the result may be null, or any additional behavioral traits.

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 a single efficient sentence with no filler. The action and object are front-loaded, and every word contributes to understanding the tool's purpose.

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

Completeness3/5

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

For a one-parameter tool with full schema coverage, the core purpose is clear. However, with no output schema and no mention of return format or potential failures, plus a likely overlapping sibling tool, the description is minimally viable but leaves some ambiguity for an agent deciding between get_ad_code and get_ad_snippet.

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

Parameters3/5

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

Schema description coverage is 100%, so the baseline is 3. The description adds no extra semantic context beyond the schema; it simply repeats the concept of 'ad unit' without providing examples, format, or guidance. The schema already documents the parameter adequately.

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?

The description states a clear verb ('Get') and resource ('HTML/JS ad code snippet for an ad unit'), making the core purpose unambiguous. It does not differentiate from the similarly named sibling get_ad_snippet, so it misses the full 5.

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

Usage Guidelines2/5

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

No guidance is given on when to use this tool versus alternatives, nor any exclusions. The phrase 'ready to paste into your website' implies a use case, but the confusingly similar sibling get_ad_snippet is not mentioned, leaving the agent without clear selection criteria.

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