Skip to main content
Glama

Knowledge base: Get doc

kb_get_doc
Read-only

Read one KB document by id — its metadata + chunk texts. Read-only. Returns null when no such document is visible to the caller (a wrong-owner id is indistinguishable from a missing one).

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": {
      "doc_id": "<doc_id>"
    },
    "name": "kb_get_doc"
  }
}

Input Schema

NameRequiredDescriptionDefault
doc_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, openWorldHint=false, and destructiveHint=false, so the safety profile is covered; the description still adds real value by specifying the null-return behavior for missing documents and the deliberate owner-visibility masking. That visibility-masking note is exactly the kind of behavior an agent cannot get from annotations and matters for how it reports a miss to a user.

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?

Three short sentences, front-loaded with the core action, then the safety/return caveats. No filler, and the most decision-relevant caveat (null on missing or foreign-owned) is placed last for emphasis rather than buried.

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 convey return shape, and it does: metadata plus chunk texts, with null as the negative case. It stops short of noting the potential size of the chunk-text payload or any truncation/pagination behavior, which is the one thing an agent calling this on a large document would want to know.

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 0% on the single doc_id parameter, so the description carries the burden; it clarifies that the value is a document id and that a wrong-owner id silently resolves to null. It does not say where the id comes from or that the field accepts either an integer or a string, leaving part of the semantics to the schema's type union alone.

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?

"Read one KB document by id — its metadata + chunk texts" names a precise verb, resource, lookup key, and payload. The phrase "by id" distinguishes it from the retrieval-by-query sibling kb_search without needing the sibling named.

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?

Usage is only implied: the "by id" framing signals this is a direct fetch that presumes an id already in hand, so an agent can infer kb_search precedes it. There is no explicit when-to-use/when-not statement or named alternative, so the routing is left to inference.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources