Skip to main content
Glama
laserdata

LaserData Docs MCP

Official
by laserdata

extract_code_snippets

Read-only

Extract code snippet inventories from documentation, capturing doc keys, headings, languages, line numbers, source URLs, and code for snippet verification and docs CI design.

Instructions

Return an inventory of fenced code snippets from the documentation.

The result includes the doc key, title, heading, language, line number, source URL, and code. Use this for snippet verification and docs CI design.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyNo
languageNo
max_snippetsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, openWorldHint=false, destructiveHint=false, so the safety profile is covered. The description adds the shape of the result (doc key, title, heading, language, line number, source URL, code), which is useful context, though it largely duplicates the output schema rather than disclosing behavior like filtering or pagination limits.

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?

Two short sentences, front-loaded with the core purpose followed by the use case. The enumerated return fields are somewhat redundant given an output schema exists, but the overall size is tight and well-ordered.

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?

An output schema exists, so return values need not be spelled out. The gaps are the three undocumented parameters and the lack of disambiguation from find_examples. Adequate but with clear holes for a filtering tool.

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

Parameters2/5

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

Schema description coverage is 0% across three parameters (key, language, max_snippets), so the description must compensate and does not. It never explains that key scopes to a doc, that language filters snippets, or what max_snippets caps; it only references language as a returned field, not as a filter.

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+resource: 'Return an inventory of fenced code snippets from the documentation.' An agent can tell this extracts code snippets. However, it does not differentiate from the sibling find_examples, which plausibly overlaps, so it stops short of a 5.

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

Usage Guidelines3/5

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

'Use this for snippet verification and docs CI design' gives an intended use case, but there is no when-not guidance and no mention of alternatives such as find_examples or get_doc. Usage is implied rather than disambiguated.

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