Skip to main content
Glama

extract_test_examples

Extract real API usage examples from test files, including instantiation, method calls, and workflows. Supports 9 languages.

Instructions

Extract usage examples from test files. Analyzes test files to extract real API usage patterns including instantiation, method calls, configs, setup patterns, and workflows. Supports 9 languages (Python AST-based, others regex-based).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileNo
directoryNo
languageNo
min_confidenceNo
max_per_fileNo
jsonNo
markdownNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

The description discloses that Python uses AST-based parsing while other languages use regex-based, which is a useful behavioral trait. However, it does not mention any side effects, performance implications, or limitations (e.g., accuracy differences, resource usage). Without annotations, more detail would be beneficial.

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 very concise: two sentences that front-load the main action and then expand on supported languages. No wasted words. The structure is efficient.

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

Completeness2/5

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

Given the high number of parameters (7) and zero schema descriptions, the description fails to provide sufficient context for correct invocation. While the purpose is clear, the agent lacks details on how to set parameters, which are optional/required, and what the expected output covers (though output schema exists).

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

Parameters1/5

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

Schema description coverage is 0%, yet the tool description provides no explanations for the 7 parameters. The agent must infer meaning from names like 'file', 'directory', 'language', etc., without hints about usage, defaults, or constraints. The description adds no value beyond the schema.

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's purpose: 'Extract usage examples from test files.' It elaborates on what is extracted (instantiation, method calls, etc.) and distinguishes from siblings by specifying it targets test files and supports 9 languages. This is specific and unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description does not provide guidance on when to use this tool instead of alternatives like 'extract_config_patterns' or scraping tools. No hints about prerequisites, exclusions, or preferred contexts. The agent is left to infer from the purpose alone.

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/yusufkaraaslan/Skill_Seekers'

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