Skip to main content
Glama

Extract Citations

extract_citations

Parse a wikitext string to return every {{cite ...}} template it contains, helping you analyze or validate citations in page source.

Instructions

Return every {{cite ...}} template found in a wikitext string.

Input Schema

NameRequiredDescriptionDefault
textYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.1/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It usefully implies the output is the raw matched templates rather than parsed citation objects, which is behaviorally meaningful against siblings. However, it discloses nothing about return structure, duplicate handling, malformed or nested templates, or failure behavior on non-wikitext input.

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?

A single front-loaded sentence with zero filler. It is appropriately sized for the operation, though it is terse to the point of under-specification.

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

Completeness2/5

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

As a pure function with no output schema and no annotations, the description must carry the full contract. It omits the shape of the return value, ordering, and behavior on inputs containing no citation templates, leaving real ambiguity for the agent.

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 0% and the single parameter is named generically as 'text'. The description partially compensates by clarifying that the input is a wikitext string, which is the only semantic detail an agent needs here. It adds no information about expected formatting or encoding.

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 specific verb (Return/extract) and resource ({{cite ...}} templates) with scope (found in a wikitext string). It is clearly distinguishable from sibling tools like parse_citations or get_citation_types in that it returns raw templates rather than parsed metadata, though that contrast is never made explicit.

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 on when to use this tool versus parse_citations, parse_all_citations, extract_with_regex, or get_citation_types, all of which operate on similar inputs. The agent must infer the distinction from the name alone.

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