Skip to main content
Glama

How do I do this?

how_do_i
Read-onlyIdempotent

Return the 1-2 best code snippets for a task with a library, plus the gotcha for each. Snippets are correct for the indexed version. Far cheaper in tokens than a docs dump.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
taskYesWhat you want to do, e.g. "retry a failed request"
libraryYesLibrary name as published on npm or PyPI

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
answerYesThe clamped text answer (hard limit ~500 tokens)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

The description adds behavioral details beyond the annotations: it returns exactly 1-2 snippets, includes gotchas, and ensures snippets are correct for the indexed version. It also notes token efficiency. These are useful, non-redundant disclosures.

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 is two sentences long, front-loads the primary purpose, and avoids redundant information. Every sentence contributes value.

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

Completeness5/5

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

Given the tool's simplicity, schema coverage, output schema, and annotations, the description covers all essential aspects: what it does, what it returns, and a key constraint on version correctness. It is complete for an agent to select and invoke the tool.

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 already describes both parameters (library and task) with 100% coverage. The description does not add additional parameter semantics beyond aligning with the schema, so baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool returns the 1-2 best code snippets for a task with a library, including gotchas, which differentiates it from sibling tools like docs_link or alternatives.

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?

The description gives context about the tool's benefit (cheaper than a docs dump) but does not explicitly mention when to use it versus the sibling tools. It implies usage for quick code examples but lacks explicit exclusions or alternative tool names.

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.