Skip to main content
Glama

kg_drift

Detects drift between declared architecture and actual Python imports, reporting undocumented and stale dependencies.

Instructions

Detect drift between the declared architecture and Python imports under code_root.

Best-effort: treats each top-level package as a service and infers edges from imports. Reports undocumented and possibly-stale dependencies.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
code_rootYes
graph_pathNo.claude/architecture.md

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

With no annotations provided, the description must disclose all behavioral traits. It mentions 'best-effort' implying non-guaranteed correctness, and that it reports 'possibly-stale dependencies' and 'undocumented' edges. However, it does not disclose side effects, system modifications, required permissions, or the nature of the output beyond the mention of reports. The output schema exists but is not provided, so the description partially but incompletely covers behavior.

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 brief (two short paragraphs) with front-loaded purpose. The first sentence defines the tool, the second adds method details. No redundant information. It could be more structured but remains efficient.

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 the complexity of drift detection, the description explains the method (best-effort, treats top-level packages as services, infers edges) and what is reported (undocumented, possibly-stale dependencies). However, it does not explain prerequisites (e.g., existence of architecture file), output format (though output schema exists but not provided), or error handling. It is somewhat complete but leaves gaps.

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?

The input schema has 0% description coverage, so the description must compensate. It provides context for code_root (directory to scan) and implicitly for graph_path (architecture file) via 'Detect drift between declared architecture and Python imports' and the default value. However, it does not explicitly link parameter names to their roles or describe the format expected. This is adequate but not excellent.

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 detects drift between declared architecture and Python imports, specifying the action ('detect'), the resource ('drift between declared architecture and Python imports'), and the scope ('under code_root'). This distinct purpose differentiates it from siblings like kg_diff (diff) and kg_lint (linting).

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 description explains the method (best-effort, treats top-level packages as services, infers edges from imports) and what it reports (undocumented and possibly-stale dependencies), which helps understand usage context. However, it lacks explicit guidance on when to use this tool vs alternatives like kg_diff or kg_lint, and does not mention prerequisites or limitations.

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/BV-Venky/excalidraw-architect-mcp'

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