Skip to main content
Glama

get_functions

Extract function and class definitions from Python files to analyze code structure and identify available methods for development workflows.

Instructions

Extract function and class definitions from a Python file

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filepathYesPath to the Python file
Behavior2/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 of behavioral disclosure. It states what the tool does ('extract function and class definitions') but lacks critical behavioral details: it doesn't specify the output format (e.g., structured data, plain text), error handling (e.g., what happens with invalid Python syntax), or performance characteristics (e.g., speed, memory usage). For a tool with no annotation coverage, this is a significant gap.

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 a single, efficient sentence that directly states the tool's purpose with zero wasted words. It is appropriately sized for a simple tool and front-loaded with the core functionality, making it easy for an agent to parse quickly.

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 tool's moderate complexity (parsing Python files), lack of annotations, and no output schema, the description is incomplete. It doesn't explain what the tool returns (e.g., list of definitions, JSON structure), how it handles edge cases (e.g., nested classes, decorators), or any limitations (e.g., file size constraints). For a parsing tool with no structured output documentation, this leaves too much ambiguity.

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 has 100% description coverage, with the single parameter 'filepath' clearly documented in the schema. The description adds no additional semantic information about parameters beyond what's in the schema (e.g., no details on path formats, relative vs. absolute paths, or file encoding). With high schema coverage, the baseline score of 3 is appropriate.

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's purpose with a specific verb ('extract') and resource ('function and class definitions from a Python file'). It distinguishes itself from siblings like 'read_file' (which reads raw content) or 'analyze_code' (which might perform broader analysis). However, it doesn't explicitly differentiate from potential similar tools like 'search_in_files' for finding definitions, keeping it at a 4 rather than a 5.

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 provides no guidance on when to use this tool versus alternatives. It doesn't mention when to prefer 'get_functions' over 'read_file' followed by manual parsing, or over 'analyze_code' for more comprehensive analysis. There's also no mention of prerequisites (e.g., file must exist, be valid Python) or exclusions (e.g., not for non-Python files).

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/Abhi-vish/code-buddy'

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