Skip to main content
Glama

analyze_code

Analyze TypeScript/JavaScript code structure to understand dependencies, imports, exports, and file relationships. Use this tool to identify patterns, detect issues, and gain insights into your codebase organization.

Instructions

Analyze TypeScript/JavaScript code structure

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesFile or directory path to analyze
optionsNo
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. It mentions analyzing code structure but doesn't disclose behavioral traits such as whether it's read-only (likely, but not stated), if it modifies files, what permissions are needed, or how it handles errors. This leaves significant gaps for an agent to understand its operation.

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 with no wasted words. It's front-loaded and directly states the tool's function, making it easy 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 complexity (2 parameters, nested objects, no output schema, and no annotations), the description is incomplete. It doesn't explain what the analysis outputs, how results are returned, or any constraints like file size limits. For a tool that likely produces structured insights, this leaves the agent guessing.

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 50%, with the 'path' parameter well-described but the 'options' object lacking internal descriptions. The description adds no parameter semantics beyond the schema—it doesn't explain what 'analyze' means in terms of inputs or how options affect the analysis. With partial schema coverage, this is a minimal baseline.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Analyze TypeScript/JavaScript code structure' clearly states the action (analyze) and target (code structure), but it's vague about what 'analyze' entails—does it check syntax, dependencies, complexity, or something else? It distinguishes from obvious non-siblings like file operations, but not from similar tools like 'modify_code' or 'suggest_refactoring'.

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 guidance is provided on when to use this tool versus alternatives. For example, it doesn't specify if it's for static analysis, debugging, or pre-commit checks, nor does it mention prerequisites like needing the code to be locally accessible. The context of sibling tools like 'modify_code' or 'suggest_refactoring' is ignored.

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/proofmath-owner/ai-filesystem-mcp'

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