Skip to main content
Glama
codedev-mcp

codedev-mcp

by Kranthithota

analyze_file

Read-onlyIdempotent

Analyze a single code file to extract symbols, imports, line counts, complexity score, and a full structural outline for review or navigation.

Instructions

Deep analysis of a single file: symbols (functions, classes, types), imports, line counts, complexity score, and full structural outline.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "path": "<path>"
    },
    "name": "analyze_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesFile path relative to project root

Output Schema

NameRequiredDescriptionDefault
fileYes
linesYes
outlineYes
languageYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.2.5

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true and openWorldHint=false, so the safety profile is fully covered structurally. The description adds the analytical breadth of the result but says nothing about language support, file-size limits, runtime cost, or failure modes for unsupported/binary files. With annotations carrying the safety burden, this is adequate but thin.

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?

One sentence, front-loaded with the verb and scope, followed by a compact inventory of outputs. No filler, though the parenthetical 'functions, classes, types' is illustrative rather than informative for an agent.

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?

An output schema exists, so return values needn't be spelled out, and the single required parameter is fully documented. The remaining gap is behavioral: nothing tells the agent about supported languages or handling of unparseable files, which matters for a static-analysis tool, but the definition is otherwise sufficient to invoke correctly.

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?

Only one parameter, and the schema already documents it as 'File path relative to project root' with 100% coverage. The description restates 'a single file' and adds no path format, resolution, or error-handling semantics beyond the schema, so baseline 3 applies.

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?

States a specific verb and resource ('Deep analysis of a single file') and enumerates the artifacts produced: symbols, imports, line counts, complexity score, structural outline. That makes the tool's output scope concrete, though it never names a sibling such as code_metrics or find_long_functions to clarify how it differs from project-level analysis.

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 phrase 'a single file' implicitly contrasts with codebase-wide siblings, but there is no explicit when-to-use, when-not-to-use, or named alternative. An agent must infer from the name and sibling list alone whether to call this or code_metrics for the same question.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.