Skip to main content
Glama

update context retention

native.update_context_retention
DestructiveIdempotent

Change only this chat's working context: discard unhelpful bodies, keep exact original lines, release pins, or restore a source. Never deletes project data. Supply the checkpoint from get_context_status/contextStatus and an idempotent request_id. Discard/keep/release are recorded immediately and applied at the next context compaction (they appear under pendingRetention in the runtime status until then); restore reloads on the next input. Set compact_now to true to force that compaction before the next model call. Changes apply atomically in declared tool order; required instructions and pending protocol are protected.

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": {
      "work_id": "<work_id>",
      "arguments": "<arguments>",
      "expected_catalog_version": "<expected_catalog_version>",
      "read_skills": "<read_skills>",
      "request_key": "<request_key>"
    },
    "name": "native.update_context_retention"
  }
}

Input Schema

NameRequiredDescriptionDefault
work_idYes
argumentsYes
read_skillsYesExact required native skills and their dependencies, copied from the accepted session bootstrap's skills array. Include only entries in that array. General mcp.* guides and native.{studio}.instructions are guidance, not native skill proofs.
request_keyYes
publication_proposal_idNoFor native Social scheduling, the exact server-approved publication proposal. This identifier cannot confer approval by itself.
expected_catalog_versionYesFor a new session, read a studios/{studio}/native/{pack} child toolset and copy invocation.catalog_version from a native tool descriptor. Do not use the top-level library version. For calls in an existing session, use that session proposal's catalog_version.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the annotations it discloses non-obvious timing semantics that no structured field conveys: discard/keep/release are recorded immediately but applied at the next context compaction and surface under pendingRetention, while restore reloads on the next input. It also declares atomic application in declared tool order and that required instructions and pending protocol are protected, which meaningfully tempers the destructiveHint=true annotation without contradicting it.

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?

It is front-loaded with purpose and scope, then moves to prerequisites, then timing, then the compact_now escape hatch – a sensible order. The parenthetical about pendingRetention is dense and the paragraph runs long for a single block, but no sentence is filler.

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 destructive, atomic, deferred-application mutation tool with a nested changes array and an output schema, the description covers what an agent needs: prerequisites, effect timing, atomicity, protected content, and a forced-compaction option. Return values are covered by the output schema, so no further explanation is required.

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 description coverage is only 50%, so the description has to carry weight, and it does: it maps the four operation enum values to their effects, explains expected_checkpoint's source, request_id's idempotency contract, and compact_now's timing. work_id, request_key and the ordering of changes are still left implicit, so it does not fully close the coverage gap.

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 description opens with a specific verb plus resource and an explicit scope limit: "Change only this chat's working context," then enumerates the four concrete operations (discard bodies, keep exact lines, release pins, restore a source). The clarifying clause "Never deletes project data" separates it from the document/element mutation siblings such as native.apply_document_edits, so an agent can pick it without opening the 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?

It states prerequisites ("Supply the checkpoint from get_context_status/contextStatus and an idempotent request_id") and a conditional action ("Set compact_now to true to force that compaction before the next model call"), which tells the agent when to use which variant. It stops short of naming an alternative tool or an explicit when-not-to-use case, so it is clear context without full routing guidance.

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