Skip to main content
Glama

Docs that describe a file

docguard_docs_for_path
Read-onlyIdempotent

Identify which documentation describes a given project file, returning canonical doc lines, annotations, references, lifecycle status, and cached open findings for that exact path.

Instructions

Exact answer to "which documentation describes this file?": canonical doc lines that name it (with heading, anchor and section), AGENTS.md/CLAUDE.md/GEMINI.md lines, the @implements/@req IDs it declares, its @doc annotations, doc sections whose covers= includes it with their review state, the referencing docs that are not active (superseded, retired) under docs.lifecycle, and, when a guard run for this exact tree state is cached, the open finding codes of each doc under docs.openFindings. Deterministic, bounded, no model.

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

Input Schema

NameRequiredDescriptionDefault
pathYesProject-relative file path, e.g. src/api/users.ts
projectDirNoProject to inspect: a directory inside the directories this server serves (absolute, or relative to the served directory). Defaults to the served directory.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.43.0

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already declare read-only, idempotent, closed-world, non-destructive, so the safety profile is covered; the description adds that results are deterministic and bounded with "no model" involved, which is real behavioral context an agent cannot read off the annotations. It also discloses the conditional caching behavior ("when a guard run for this exact tree state is cached"), explaining why openFindings may or may not appear — a genuinely useful non-obvious trait.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The lead question is well front-loaded, but everything after it is a single comma-chained sentence enumerating seven output categories at once, which makes it dense and hard to scan. Every clause carries information, yet the lack of structure (no list, no grouping) costs readability for a description of this length.

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?

There is no output schema, so the description must carry the return shape — and it does, enumerating canonical doc lines with heading/anchor/section, agent-instruction files, @implements/@req IDs, @doc annotations, covers= sections with review state, inactive/superseded docs, and openFindings codes. Given a 2-parameter read tool, this is close to complete; only the ordering or formatting of the returned bundle is left unspecified.

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%, with path and projectDir both documented in the schema itself, including an example path and the defaulting rule for projectDir. The description adds no further parameter meaning (no ordering, no path-format edge cases), so the baseline 3 applies — the schema does the work.

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?

"Exact answer to 'which documentation describes this file?'" names the resource (documentation referencing a given file) and the operation (lookup/answer) precisely, and the file-centric framing separates it from siblings like docguard_doc_structure or docguard_read_section. It stops short of explicitly naming which sibling to use instead, so it separates by implication rather than by routing.

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 framing implies the use case (given a path, find the docs that govern/describe it), but there is no explicit "use this when… use X instead when…" guidance and none of the eleven siblings are named. An agent must infer from the sibling list that this is the reverse-lookup counterpart to docguard_doc_structure.

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