Skip to main content
Glama
project-context-map-mcp

project-context-map-mcp

explain_file_role

Explains why a repository file exists, which module it belongs to, and whether it changed recently so AI coding agents can understand its purpose and context.

Instructions

Explain why a file exists, which module it belongs to, and whether it changed recently.

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": "explain_file_role"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesRepository-relative file path.
projectRootNoOptional project root. Defaults to PROJECT_ROOT or current working directory.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.8

TDQS

B3.3/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden and it does not state that this is a read-only operation, whether it consults git history or a cached project map, whether the map must be refreshed first (refresh_project_map exists as a sibling), or what happens for untracked/ignored files. The only behavioral hint is the implicit 'explain' framing, which suggests inspection rather than mutation.

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?

A single front-loaded sentence that lists the three outputs in a logical order with zero filler. Nothing to cut and nothing misplaced.

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?

The tool is simple (2 params, no output schema, no nested objects), and the description does sketch the return shape, which is the right call given there is no output schema. However, for an explanation tool whose output is free-form text, the agent gets no sense of depth, format, or staleness caveats, and with zero annotations the safety profile is also unstated.

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 coverage is 100% and both parameters are documented there, including the PROJECT_ROOT/cwd default. The description adds no meaning beyond the schema — no notes on path format edge cases (e.g., leading slash, absolute path rejection) or when projectRoot matters. 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?

Names a specific verb ('Explain') and resource (a file's role) and enumerates the three things returned: why the file exists, its module, and recency of change. An agent can tell this is an analytical/inspection tool, though it does not explicitly name which sibling (get_module_context, get_recent_git_changes) to prefer for a narrower question.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The use case is implied by the wording — reach for this when you need orientation on an unfamiliar file — but there is no explicit when-to-use, no prerequisites, and no routing to alternatives. Nothing tells the agent whether to call this before or instead of get_module_context or get_recent_git_changes.

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