Skip to main content
Glama
Unilytics MCP Server

Unilytics MCP Server

Official

kb_get_document

Read-only

Read a stored knowledge base document's full content and metadata, page by page, instead of search chunks. Use when you need a known or previously written document read end to end.

Instructions

Read a KB document's stored content and metadata (not just search chunks). Use when the user wants a known document, or a previously written one, read end to end.

Content comes in pages of up to 40,000 characters as sent (JSON-escaped, so quotes and line breaks
count twice): `truncated` is true and `next_cursor` is set
while more follows; pass it back as `cursor` for the next page. A whole-file kb_search result's
`content_next_cursor` is such a cursor too. `total_chars` is the full length.
For a file, `document.content_hash` fingerprints the full stored text: it is the same on every page
while the document is unchanged, and propose_context_record cites the document with it.
`document.text_fingerprint` fingerprints the same text with spacing, quote marks and case
normalised, the way the context_write_qa skill compares a copy of it. A long
name or error ends in "…"; a value too large to return (metadata, path, source_url) is null and
`document.omitted_fields` names it with its size.

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": {
      "project_id": "<project_id>",
      "document_id": "<document_id>"
    },
    "name": "kb_get_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
cursorNo
project_idYes
document_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.1.0
    • removedInput schema / properties / config
      Removed value: -{
      -  "default": null,
      -  "title": "config",
      -  "type": "string"
      -}
    • addedInput schema / properties / cursor
      Added value: +{
      +  "default": null,
      +  "title": "Cursor",
      +  "type": "string"
      +}
  2. First observedv1.0.0

TDQS

A4.3/5.0
Behavior5/5

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

Annotations already cover the safety profile (readOnly, non-destructive, closed-world), and the description goes well beyond them: page size of 40,000 characters, `truncated`/`next_cursor` protocol, JSON-escaping inflation of quotes and line breaks, `total_chars` semantics, and the "…"/null handling for oversized values with `document.omitted_fields`. This is exactly the behavioural context annotations cannot express.

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?

Purpose and usage are front-loaded in the first two sentences, with return-value detail following. Some passages are dense and run-on (the fingerprint sentence), but with no output schema in play much of that detail earns its place.

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?

With no output schema, the description correctly takes on return-shape disclosure and does so in detail, including pagination continuation, length fields, and hash fingerprints. Gaps remain: the meaning of the two required identifiers, and what happens on a missing document or insufficient access, are 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 0%, so the description must carry the load. It explains `cursor` thoroughly (pass back `next_cursor`, and `content_next_cursor` from kb_search is also valid), but says nothing about `project_id` or `document_id` beyond the prose implying a known document. The hardest parameter is covered; the two required identifiers are left to their names.

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 ("Read a KB document's stored content and metadata") and immediately scopes it against the obvious sibling behaviour with "not just search chunks." An agent can distinguish this from kb_search without opening either schema.

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

Usage Guidelines4/5

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

Explicit trigger given: "Use when the user wants a known document, or a previously written one, read end to end." The phrase "not just search chunks" implicitly routes discovery-style queries elsewhere, but no sibling tool (e.g. kb_search) is named and no when-not condition is spelled out.

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

Deploy Server

Other Tools