Skip to main content
Glama

context

DestructiveIdempotent

Store, pack, or delete reusable code and file bundles under a key for sharing across agents, so large blobs are pasted once and referenced instead of repeated.

Instructions

Change the shared context bus — dispatched by op. 'write' stores value under key (paste a big blob ONCE, then reference it via context_ref instead of re-pasting it every call); 'pack' reads the repo files named in paths (each path or path:START-END, relative to the configured project root) and stores the budgeted bundle under key; 'delete' removes key. Reusing a key overwrites it, and the store is shared by every agent on this server — read with context_read first. Destructive/overwriting.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
opYes'write' stores `value` under `key`; 'pack' reads the repo files in `paths` and stores the bundle under `key`; 'delete' removes `key`.
keyYesThe context key (required for every op).
pathsNoop='pack': file specs relative to the configured project root, each a path or `path:START-END` (1-indexed inclusive).
valueNoop='write': the context to store — code, file contents, a stack trace, design notes. Paste it ONCE, then reference it by key via `context_ref`.
max_charsNoop='pack': optional cap on total packed characters (default ~24000).
descriptionNoop='write': optional one-line note about what this holds.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.18.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already mark destructiveHint true and readOnlyHint false, and the description reinforces this with 'Destructive/overwriting' and the overwrite-on-reuse warning. It adds valuable context beyond annotations: the store is shared across agents, pack produces a budgeted bundle, and reading with context_read first is recommended.

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 description is dense but front-loaded, opening with the resource and then detailing each operation in order. Some wording duplicates the schema and the final 'Destructive/overwriting' tag is redundant with annotations, but overall it is appropriately sized for a three-mode tool.

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?

For a three-operation tool with no output schema, the description covers the key behaviors: what each op does, path syntax, key reuse, overwrite semantics, and cross-agent sharing. It could have clarified return/confirmation behavior and per-op parameter exclusion, but those are minor given the schema and annotations.

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 description coverage is 100%, so the schema already documents all six parameters. The description mostly restates the op-specific behavior already present in the schema for value, paths, max_chars, and description, and adds no new parameter-level semantics beyond the global reuse and sharing warning.

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 names the resource (shared context bus) and makes the generic verb 'Change' concrete by enumerating the three operations: write stores a value, pack bundles repo files, and delete removes a key. It also differentiates itself from the sibling context_read by instructing the agent to read with context_read first.

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

Usage Guidelines5/5

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

It gives explicit usage guidance: paste a large blob once and reference it via context_ref instead of re-pasting it, use pack for repo files, and read with context_read before relying on shared content. It also warns that the store is shared by every agent and that reusing a key overwrites it, telling the agent when extra caution is needed.

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