Skip to main content
Glama

get_knowledge_base_document

Read-only

Return the FULL text of one knowledge-base document, with contentSha256 — the hash edit_knowledge_base_text_document quotes as expectedSha256. Read-only. get_workspace_summary and get_application_context show each document only as a preview (truncated: true when cut), so read the document here before correcting it. A very long document comes in pages: call again with nextOffset until it is null.

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": {
      "documentId": "<documentId>"
    },
    "name": "get_knowledge_base_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
offsetNoCharacter offset to start from. Omit for the beginning; pass the previous nextOffset to continue.
maxCharsNoCharacters to return, at most 100000. Defaults to 40000.
documentIdYesRequired. Document id from knowledgeBases[].documents[].id in get_workspace_summary or get_application_context.
applicationIdNoApplication (workspace) id. Optional: an application-scoped key (app_...) defaults to its own application, but a personal key (usr_...) has no default and omitting it fails with MCP_APPLICATION_REQUIRED. Call list_applications to get the id.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false and openWorldHint=false, so the safety profile is covered; the description still adds real value by disclosing the paginated return behavior, the meaning of truncated:true previews elsewhere, and the role of contentSha256 as the expectedSha256 value used by the edit tool. It stops short of describing output shape (text vs. encoded body) or failure modes for a missing/oversized document, so it is not fully complete.

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?

Four short sentences, front-loaded with the return value and its hash, then routing/differentiation, then the pagination rule. Every sentence carries distinct information; nothing restates the name or title.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/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 return semantics — and it does: full untruncated text, contentSha256, and a paged delivery model driven by nextOffset. Combined with a fully described 4-parameter schema and explicit read-only annotations, an agent has everything needed to call it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the schema already defines offset, maxChars, documentId and applicationId. The description still adds loop-level semantics the per-parameter text leaves implicit: that the returned nextOffset must be fed back as the next call until it is null, which is the actual invocation pattern an agent needs.

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?

States a specific verb and resource ('Return the FULL text of one knowledge-base document') plus the extra artifact returned (contentSha256). It explicitly distinguishes itself from get_workspace_summary and get_application_context, which only surface truncated previews, so an agent can pick the right tool without opening a schema.

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

Usage Guidelines5/5

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

Gives an explicit when-to-use rule ('read the document here before correcting it') tied to the sibling tools that only show previews, and names edit_knowledge_base_text_document as the consumer of the returned hash. The pagination instruction ('call again with nextOffset until it is null') further defines the usage loop.

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.