Skip to main content
Glama

analyze_code

Analyze code files for insights using OpenAI API. Provide the absolute path to the file and receive detailed analysis in minutes.

Instructions

Analyze code using OpenAI API (requires your API key). The analysis may take a few minutes. So, wait please.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codePathYesAbsolute path to the code file to analyze (e.g. /Users/username/project/src/code.ts)
Behavior3/5

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

With no annotations, the description carries full burden. It discloses that analysis 'may take a few minutes' (timing behavior) and requires an API key (authentication need), which are useful behavioral traits. However, it lacks details on rate limits, error handling, or what happens during analysis (e.g., data sent to OpenAI). No contradiction with annotations exists.

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 concise with three short sentences, front-loading the main action ('Analyze code using OpenAI API'). However, the phrase 'So, wait please' is slightly informal and could be more structured, though it efficiently conveys timing without unnecessary details.

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

Completeness3/5

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

Given no annotations, no output schema, and a simple input schema, the description provides basic context (purpose, timing, auth) but is incomplete. It doesn't explain what the analysis returns (e.g., insights, reports) or potential limitations, leaving gaps for a tool that interacts with an external API and involves waiting.

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 100%, with the parameter 'codePath' well-documented in the schema as an absolute path. The description adds no additional meaning beyond this, such as file format constraints or analysis scope based on path. Baseline 3 is appropriate as the schema handles parameter documentation adequately.

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 states the tool 'Analyze code using OpenAI API' which provides a verb ('analyze') and resource ('code'), but it's vague about what analysis entails (e.g., security, performance, style). It doesn't distinguish from siblings like 'collect_code' or 'create_github_issues', leaving ambiguity in purpose.

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 mentions 'requires your API key' and 'wait please', implying prerequisites and timing, but offers no explicit guidance on when to use this tool versus alternatives like 'collect_code' for gathering code or 'create_github_issues' for issue tracking. No exclusions or clear context for tool selection are provided.

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

Related 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/aindreyway/mcp-neurolora'

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