Skip to main content
Glama

get_code_examples

Read-onlyIdempotent

Retrieve exact code examples from official guides, filter by topic, or paginate to locate installation, token providers, chat UI, realtime, or media snippets.

Instructions

Return exact code examples from an official guide. Filter by topic, or paginate with offset to find installation, token providers, chat UI, realtime, or media examples.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
topicNo
offsetNo
guideIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, openWorldHint=false and destructiveHint=false, so the safety profile is fully covered by structured data. The description adds only that results are paginated and that specific example categories exist. No return format, ordering, or rate-limit context beyond annotations.

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 compact sentences, front-loaded with the core action and followed by filtering/pagination mechanics. Every clause is relevant, though the trailing category list is slightly list-like rather than instructional.

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 read-only retrieval tool with no output schema, the description should clarify the required guideId and result shape. It covers filtering and pagination but leaves guideId and limit undocumented across both schema and description, so an agent must guess at the anchor parameter.

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%, so the description must carry parameter meaning. It explains 'topic' and 'offset'/'paginate' behavior and hints at valid topic values ('installation, token providers, chat UI, realtime, media'). However, the required 'guideId' and the 'limit' default/cap are never explained, leaving a meaningful gap.

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 specific verb and resource: 'Return exact code examples from an official guide.' It clarifies scope ('exact', 'from an official guide'), which distinguishes it from a general doc search. However, it doesn't explicitly contrast itself with siblings like search_docs or get_guide, so an agent must infer the boundary.

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?

It offers implied usage ('Filter by topic, or paginate with offset'), which tells the agent how to narrow or walk results. But it gives no explicit when-to-use versus alternatives such as search_docs or get_guide, and no prerequisites. Minimum viable guidance.

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