Skip to main content
Glama

get_context

Retrieve passages surrounding a specific search-result passage in reading order, with configurable before/after counts, to expand context from Zotero PDFs.

Instructions

Passages around passage seq of a work, in reading order (seq comes from search results).

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": {
      "item_key": "<item_key>",
      "seq": "<seq>"
    },
    "name": "get_context"
  }
}

Input Schema

NameRequiredDescriptionDefault
seqYes
afterNo
beforeNo
item_keyYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden and does not meet it. It never states that this is a read-only operation, gives no limits on how many passages can be requested, and says nothing about what happens when `seq` is at the boundary of a work (clamping, empty results, errors).

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?

A single compact sentence with no filler, and the key concept (passages around a seq) is front-loaded. It is perhaps overly compressed — a grammatical fragment that drops the verb entirely.

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

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return values need not be described, but with zero annotation coverage and zero schema description coverage across four parameters, the description leaves the core context-window mechanics unexplained. For a neighbor-fetch tool whose whole purpose is sizing a window, this is a real gap.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate, and it only explains `seq` (comes from search results). The two most consequential knobs, `before` and `after` (default 1 each), are never mentioned, so an agent cannot tell they control the context window size; `item_key` is also undocumented.

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?

The description names the specific resource (passages surrounding a given `seq` within a work) and the ordering contract ('in reading order'), which is enough to distinguish it from search_library and get_item. It lacks an explicit verb and never names the siblings it complements, so it falls just short of full differentiation.

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?

'seq comes from search results' implies this is a follow-up step after a search, which is useful sequencing guidance. But there is no statement of when to prefer this over get_item or search_within_item, and no exclusions or prerequisites beyond the seq provenance hint.

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