Skip to main content
Glama

get_code_examples

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesWhat code to find
languageNoProgramming language filter

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.5/5.0
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It does not state whether the tool is read-only, what the output format is, or any side effects. The term 'Extract' implies reading, but that is implicit rather than explicit, leaving significant gaps.

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 consists of two concise sentences. The first sentence states the main action and resource, and the second adds a use case. Every word earns its place, with no redundancy or unnecessary detail.

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 simple tool with only two parameters and no output schema, the description provides the core purpose and a usage hint. However, it fails to explain the return format or output structure, which is a gap given the absence of an output schema. It is adequate but not thorough.

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?

The input schema provides full descriptions for both 'query' and 'language' parameters, achieving 100% schema description coverage. The tool description adds no additional parameter details beyond what the schema already states, so the baseline score of 3 is appropriate.

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 clearly states the tool's function with a specific verb ('Extract') and resource ('code snippets and examples from source documentation'). It distinguishes from siblings like search_docs by focusing on code examples, but does not explicitly contrast with query_source or extract_schema, so it falls 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 Guidelines4/5

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

The phrase 'Ideal for finding implementation patterns' provides a clear use case for when this tool is appropriate. However, it does not mention alternatives or when not to use it, so it lacks explicit exclusions and alternative guidance.

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