Skip to main content
Glama

find_example

Find the closest canonical example for a task, with ranked alternatives when the top match isn't right. Returns example code and options to help you proceed.

Instructions

Find the closest canonical example for a task.

Args: task: Short description of what the user wants to do.

Returns: A mapping with task and example. available_examples lists every bundled example name, so another can be requested when the match is wrong, and other_candidates ranks the next best matches so a close call is visible. example is None when nothing matched, otherwise {path, score, source} where source is the complete example in an untrusted-content envelope, capped at 32 KiB. checkout_example is the nearest match in a Synthesizer source checkout when one exists, and carries only an excerpt, not the whole file. notes explains an empty result and error is present only when the search failed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
taskYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Install Server

TDQS

A4.4/5.0
Behavior5/5

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

With no annotations, the description fully carries the behavioral burden. It thoroughly describes the return contract: available_examples, other_candidates, the None case, the untrusted-content envelope, the 32 KiB cap, the checkout_example excerpt behavior, notes, and error presence. This is exemplary for a search 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?

The description is longer than average but every sentence earns its place: the purpose is front-loaded, followed by clearly separated Args and Returns sections. The return details are dense but structured in a way that is easy to scan, with no filler or repetition.

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

Completeness4/5

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

For a simple one-parameter tool with no annotations, this is nearly complete: it explains the input and the full output structure. The only gap is practical deployment context—what 'bundled examples' and 'Synthesizer source checkout' refer to in the surrounding environment—which may be known system-wide. An existing output schema would cover return types, but the description goes beyond that anyway.

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

Parameters4/5

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

The schema has zero coverage for the sole parameter, so the description must compensate. 'task: Short description of what the user wants to do' adds meaning by clarifying the parameter is a free-text request, not a structured identifier. It is terse but adequate for a single string parameter.

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 opens with 'Find the closest canonical example for a task,' which clearly states a specific verb and resource. This is immediately distinguishable from the sibling tools, which focus on plotting, environment inspection, and documentation search.

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 usage context is implied by the first line: use this when you need a canonical example for a task. However, there is no explicit when-to-use vs. alternatives, no mention of the sibling search_documentation tool, and no exclusions or conditions that would route an agent to a different tool.

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

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/synthesizer-project/synthia'

If you have feedback or need assistance with the MCP directory API, please join our Discord server