Skip to main content
Glama
gclluch
by gclluch

analyze_package

Summarize a Python directory by listing file sizes, class/function counts, docstrings, and per-file symbol lists for every .py file.

Instructions

Directory-level summary of every .py file: sizes, class/function counts, docstrings and per-file symbol lists.

Args: path: Directory to analyse. include_tests: Include test files (default False).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
include_testsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

With no annotations, the description carries the full burden. It discloses that the tool analyzes directories and outputs specific summary information, but it does not state whether traversal is recursive, whether files are modified (though 'analyze' implies read-only), or mention potential edge cases/errors. This is adequate but not rich.

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 two sentences plus concise arg explanations, front-loading the core purpose. Every line earns its place with no redundancy or fluff.

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?

The description covers the essential inputs and the nature of the output summary. An output schema exists to handle return-value details, so the description need not explain those. It lacks explicit mention of recursion depth or handling of non-.py files, which are minor gaps for a directory analysis tool.

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 coverage is 0%, so the description is the sole source of parameter meaning. It explains 'path' as the directory to analyze and clarifies 'include_tests' with its default behavior, fully compensating for the lack of schema descriptions.

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 produces a directory-level summary of every .py file, listing specific metrics like sizes, class/function counts, docstrings, and per-file symbol lists. This distinguishes it from sibling tools such as analyze_file (single file analysis) and list_functions (function-level listing).

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?

No explicit guidance on when to use this tool versus alternatives. The description implies it is for whole-package analysis, but it does not mention exclusions or name alternative tools for different scopes, leaving the agent to infer usage context.

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/gclluch/py-ast-mcp'

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