Skip to main content
Glama

get_task_context

Read persistent task state by task ID, then request exact keys, a key index, or full context to recover current values and versions for guarded updates.

Instructions

Read selected persistent task state. Default summary returns canonical current-state keys plus a paginated key index, not the whole history. Supply exact keys to retrieve particular values, view=keys to browse the index, or view=full for explicit complete access. Large responses use text cursors; never mistake a fragment for a complete document. Preserve version for guarded updates. Historical noncanonical keys remain available through the index and exact key reads.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keysNoExact top-level keys, including punctuation; missing keys are reported
viewNoDefault summary; supplying keys without view selects only those exact keys
cursorNoNext text cursor returned by a large read. Repeat identical selectors; changed content invalidates the cursor.
task_idYesThe task ID whose context to read
key_limitNoKey index page size (default 25); summary/keys views only
max_charsNoMaximum response characters (default 6000); omitted data remains explicitly retrievable.
key_offsetNoKey index next_offset; summary/keys views only
include_provenanceNoInclude per-key author/source/version provenance for current live context entries.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changedv1.19.0
    • addedInput schema / properties / cursor
      Added value: +{
      +  "description": "Next text cursor returned by a large read. Repeat identical selectors; changed content invalidates the cursor.",
      +  "maxLength": 100,
      +  "type": "string"
      +}
    • addedInput schema / properties / key_limit
      Added value: +{
      +  "description": "Key index page size (default 25); summary/keys views only",
      +  "maximum": 200,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • addedInput schema / properties / key_offset
      Added value: +{
      +  "description": "Key index next_offset; summary/keys views only",
      +  "maximum": 9007199254740991,
      +  "minimum": 0,
      +  "type": "integer"
      +}
    • addedInput schema / properties / keys
      Added value: +{
      +  "description": "Exact top-level keys, including punctuation; missing keys are reported",
      +  "items": {
      +    "maxLength": 100,
      +    "minLength": 1,
      +    "type": "string"
      +  },
      +  "maxItems": 200,
      +  "type": "array"
      +}
    • addedInput schema / properties / max_chars
      Added value: +{
      +  "description": "Maximum response characters (default 6000); omitted data remains explicitly retrievable.",
      +  "maximum": 16000,
      +  "minimum": 1000,
      +  "type": "integer"
      +}
    • removedInput schema / properties / task_id / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "number"
      -  }
      -]
    • addedInput schema / properties / task_id / type
      Added value: +[
      +  "string",
      +  "number"
      +]
    • addedInput schema / properties / view
      Added value: +{
      +  "description": "Default summary; supplying keys without view selects only those exact keys",
      +  "enum": [
      +    "summary",
      +    "full",
      +    "keys"
      +  ],
      +  "type": "string"
      +}
  2. Addedv1.9.0

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses cursor-based pagination, the critical warning that a fragment is not a complete document, the version-preservation requirement for guarded updates, and that missing keys are reported. It omits any statement about permissions or whether reads can fail, but the operational traits it does surface are high-value.

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?

Front-loaded with the default behavior and the 'not the whole history' scoping before the mode list. It is dense but every sentence carries operational information; the one advisory sentence ('never mistake a fragment for a complete document') is arguably redundant with the cursor note but earns its place as a warning.

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?

Eight parameters, no output schema, and no annotations — the description covers the read semantics, view modes, pagination, version guarding, and historical-key availability, which is most of what an agent needs. It does not explain the provenance flag or the key-limit/offset paging interplay, which remain schema-only.

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 3 is the floor, and the description adds real meaning on top: the interaction of keys with view selection, the cursor reuse rule ('repeat identical selectors; changed content invalidates the cursor'), and the purpose of version. Minor gaps remain (include_provenance, key_limit, max_chars behavior are only in the schema).

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 selected persistent task state') and immediately scopes it: the default summary returns canonical current-state keys plus a paginated index, explicitly 'not the whole history.' This distinguishes it from sibling tools like get_context_history and get_task without the agent opening any 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?

Gives explicit routing between modes — exact keys for values, view=keys to browse the index, view=full for complete access — and notes that historical noncanonical keys surface through the index. It never names get_context_history as the alternative for history, so the agent must infer the exclusion from 'not the whole history.'

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