Skip to main content
Glama

get_code_examples

Extract code snippets and examples from source documentation. Ideal for finding implementation patterns.

Input Schema

NameRequiredDescriptionDefault
queryYesWhat code to find
languageNoPreferred programming language; matching examples are listed first

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / language / description
      Previous value: -"Programming language filter"New value: +"Preferred programming language; matching examples are listed first"
  2. First observed

TDQS

B3.3/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 says nothing about where 'source documentation' is drawn from, how results are ranked or truncated, or that the operation is a read-only lookup, leaving meaningful gaps for a retrieval tool.

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?

Two sentences, no filler, and the core purpose leads before the usage hint. Nothing here is redundant or padding.

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?

With no annotations and no output schema, the description is the only source of behavioral context, and it is thin: no return shape, no ranking or limit behavior. It is minimally viable for a two-parameter read tool but leaves real gaps.

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 both 'query' and 'language' are already documented in the schema. The description adds no format, syntax, or matching-behavior detail beyond what the schema states, which is the expected baseline when the schema does the work.

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 and resource: 'Extract code snippets and examples from source documentation.' An agent knows exactly what comes back, though the description never contrasts this with siblings like search_docs or query_source that may also surface code.

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?

'Ideal for finding implementation patterns' implies a use case but gives no when-not guidance and never names an alternative tool. The agent must infer on its own whether to prefer this over search_docs or query_source for code retrieval.

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.

Resources