Skip to main content
Glama

BYOKG

Read evidence

fetch
Read-onlyIdempotent

Read one piece of evidence in full by its id (a search hit's id, or a node_id) when you need the text behind a hit: the stored text and its provenance, never a generated answer or a provider credential. Input: id (required: a search hit's id, an evidence id, a node_id, or the next_id of the page before) and offset for a later page. Returns at most 30000 characters from offset (default 0) in text and the whole length in text_total_chars. A long text is paged, never cut silently: when text_truncated is true the evidence continues at next_offset (pass it as offset with the same id) or under next_id (pass it as id, nothing else). Read every page before treating the evidence as complete, and never quote beyond the page you read. Browser URL requires independent BYOKG session reauthorization. Evidence of an imported graph node carries node_id, the start for query_graph_neighbors and query_graph_paths; id also accepts a node_id. An episode can be as large as the upload that carried it and a note up to 262144 characters. offset is not used with a next_id, which already carries its offset; beyond the text it is SOURCE_OFFSET_OUT_OF_RANGE (422). Example: {"id": ""}. Since contract revision 4.4.0 a long text is paged. The contract revision in force is the one every response repeats in _meta.contract_revision and server_info reports; a revision note (Added in, Since) says when a field or a tool appeared, never which revision is current.

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": {
      "id": "<id>"
    },
    "name": "fetch"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesA search hit's id, an evidence id, a node_id, or the next_id of the page before.
offsetNoCharacter the page starts at: the next_offset of the page before.

Output Schema

NameRequiredDescriptionDefault
idYes
urlYes
textYes
titleYes
next_idNoAdded in contract revision 4.4.0. An id that fetches the next page as the only argument; set exactly when text_truncated is true.
node_idNoPresent when the evidence records an imported graph node: its opaque node id for query_graph_neighbors and query_graph_paths. Never a physical graph key.
metadataYes
next_offsetNoAdded in contract revision 4.4.0. The offset of the next page; set exactly when text_truncated is true.
text_offsetNoAdded in contract revision 4.4.0. The character of the whole text at which this page starts.
text_truncatedNoAdded in contract revision 4.4.0. True when the text continues after this page: read on at next_offset or next_id before treating the evidence as complete.
text_total_charsNoAdded in contract revision 4.4.0. The length of the whole stored text in characters; text holds at most 30000 of them.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already cover safety (readOnly, idempotent, non-destructive, closed-world), and the description still adds real behavior: 30000-character page size, text_total_chars, silent truncation is explicitly ruled out, the 422 SOURCE_OFFSET_OUT_OF_RANGE case, and a BYOKG session reauthorization requirement for browser URLs. Those are exactly the non-obvious traits an agent cannot get from structured fields.

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 critical constraints (what it reads, paging, id forms, the error case) are front-loaded and dense but readable. The closing sentences about contract revision 4.4.0 and _meta.contract_revision are global meta-guidance rather than tool-specific behavior, and they add length without helping an agent decide or invoke.

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?

For a two-parameter read tool with an output schema, everything an agent needs is present: input forms, page size, paging loop, terminal error, size ceilings for episodes and notes, and the cross-tool node_id handoff. Return fields are described anyway, which is more than the output schema required.

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

Parameters5/5

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

Schema coverage is 100%, so the baseline is 3, but the description goes well past the schema by enumerating the four accepted id forms and explaining that next_id already carries its own offset, so offset must not be combined with it. That interlock between the two parameters cannot be expressed in either property's description 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?

The opening sentence names a specific verb and resource ('Read one piece of evidence in full by its id') and immediately bounds the scope: stored text plus provenance, 'never a generated answer or a provider credential.' That clearly separates it from search and from the graph-query siblings, which the description later names explicitly.

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?

It gives a concrete trigger ('when you need the text behind a hit') and operational guidance for paging ('read every page before treating the evidence as complete'), plus how to hand a node_id on to query_graph_neighbors and query_graph_paths. It stops short of an explicit 'use search first / do not use this to search' exclusion, so the routing to a sibling is implied rather than stated.

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