Skip to main content
Glama
voxmenthe

Search Tools MCP Server

by voxmenthe

find_api_usage_examples

Find real usage examples of APIs, functions, or classes in your codebase to learn correct usage patterns and common practices before making changes.

Instructions

Find real usage examples of APIs, functions, or classes in the codebase.

Use this tool when you need to:

  • Learn how to properly use an existing API by seeing real examples

  • Understand the different ways an API is used across the codebase

  • Find patterns and best practices for API usage

  • See what parameters are commonly used and how

Perfect for learning unfamiliar APIs, understanding usage patterns before making changes, or finding examples to follow when implementing similar functionality.

Args: repo_path: Repository path (absolute) working_directory: Working directory (absolute path) api_name: Name of the API/function/class to find examples for max_examples: Maximum number of examples to return group_by_pattern: Whether to group similar usage patterns together include_test_examples: Whether to include examples from test files show_context_lines: Number of context lines around each usage

Returns: Categorized real usage examples with context and patterns

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
api_nameYes
repo_pathYes
max_examplesNo
group_by_patternNo
working_directoryYes
show_context_linesNo
include_test_examplesNo
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses the return format (categorized examples with context and patterns), but doesn't mention any limitations, side effects, performance considerations, or explicitly state it's read-only. The read-only nature is implied but not guaranteed.

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?

The description is well-structured with clear sections: purpose, when-to-use bullets, Args, and Returns. However, there's some redundancy (e.g., 'Perfect for learning unfamiliar APIs...' repeats the bullet points), making it slightly verbose but still clear and organized.

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 tool with 7 parameters and no output schema, the description provides adequate context: clear use cases, full parameter explanations, and return type. It doesn't address edge cases or limitations, but it's sufficient for an agent to select and invoke the tool correctly without external documentation.

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

Parameters5/5

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

Schema descriptions are completely absent (0% coverage), but the description's Args section thoroughly explains all 7 parameters, including semantics like 'absolute path', maximum examples, and context line count. This fully compensates for the missing schema descriptions.

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 finds real usage examples of APIs/functions/classes in the codebase, using a specific verb and resource. It differentiates itself from siblings like get_symbol_usages by emphasizing real usage examples and patterns, though it doesn't explicitly name alternatives.

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 description provides clear when-to-use guidance with bullet points like 'Learn how to properly use an existing API' and 'Perfect for learning unfamiliar APIs'. However, it does not specify when not to use the tool or mention alternative sibling tools.

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/voxmenthe/search-tools-mcp'

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