Skip to main content
Glama

find_code_examples

Search indexed documentation for code examples by matching block content with BM25. Optionally filter by language to locate relevant code snippets.

Instructions

Search fenced code blocks across the indexed docs by BM25 over the block content. Returns one row per block with {block_id, section_id, doc_path, title, lang, byte_start, byte_end, snippet, _score}. Optional lang filter (e.g. 'python', 'bash'). Use after index_local; requires INDEX_VERSION>=3.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repoYesjdocmunch repo identifier
queryYesFree-form code-content query
langNoOptional case-insensitive language filter
max_resultsNo
Behavior4/5

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

No annotations provided, so description carries full burden. It explains search algorithm (BM25), return fields, and optional filtering, but doesn't disclose ordering or pagination behavior.

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 concise sentences front-loading key information: search method, return schema, optional filter, and usage prerequisites. No redundant text.

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?

Covers search scope, return fields, and important usage conditions. Lacks details on error handling and result ordering, but sufficient for typical use given no output schema.

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 75%. Description adds example for lang parameter but doesn't clarify repo, query, or max_results beyond schema. Minimal added value over structured fields.

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?

Description clearly states it searches fenced code blocks using BM25, distinguishes from sibling tools like search_sections and search_titles by focusing on code blocks and providing return fields.

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?

Explicitly states prerequisite (after index_local) and version requirement (INDEX_VERSION>=3), but does not compare to alternatives or when not to use.

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

Install Server

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/jgravelle/jdocmunch-mcp'

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