Skip to main content
Glama

context_write

Store reusable code, file contents, or notes under a stable key, then reference that key on ask to include context without re-pasting. Shared across agents.

Instructions

Store a chunk of context (code, file contents, a stack trace, design notes) under a stable key so you paste it ONCE and reuse it. Then pass context_ref='<key>' on ask to pull it in instead of re-pasting the same code into every call — the big lever against the re-paste tax, since the model can't see your repo. The store is shared by every agent on this server, so a sibling agent can context_read what you wrote. Reusing a key overwrites it. Give a one-line description so it shows usefully in context_list.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYesStable key to store this context under (e.g. 'repo:auth', 'ticket-431/stacktrace'). Reusing a key overwrites it.
valueYesThe context to store — code, file contents, a stack trace, design notes. Paste it ONCE here, then reference it by key via `context_ref` on `ask`.
descriptionNoOptional one-line note about what this holds (shown in context_list).

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.12.0

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden, and it does well by disclosing that the store is shared server-wide, reusing a key overwrites the previous value, and the optional description surfaces in context_list. It does not cover retention limits or what the tool returns on success, but the key side effects are transparent.

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 front-loaded with the core action and uses its four sentences efficiently; every sentence adds useful operational context. The motivational 're-paste tax' phrase is slightly embellished, and 'paste it ONCE' is repeated in spirit later, but the overall structure remains tight and readable.

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 simple three-parameter write operation with full schema coverage and no output schema, the description covers the key operational facts: shared store, overwrite behavior, usage with ask, and visibility in context_list. It does not specify return values or error behavior, but those are not critical for correctly invoking this tool.

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 the baseline is 3, but the description adds meaningful guidance beyond the schema: it gives key-naming conventions, reinforces the overwrite semantics, explains how value is consumed via context_ref, and clarifies that description is used for display in context_list. This elevates it above the baseline.

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 uses a specific verb ('Store') with a clear resource ('a chunk of context') and concrete examples (code, file contents, stack trace, design notes). It distinguishes this write tool from siblings by referencing context_read and context_ref, so an agent can tell at a glance that this is the write-side counterpart.

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?

The description gives an explicit use case: store context once and reuse it via context_ref on ask instead of re-pasting code. It also mentions that sibling agents can context_read what was written, which helps clarify the relationship to related tools. However, it does not state explicit exclusions or when to prefer context_delete/context_pack.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/baggybin/ask-fable'

If you have feedback or need assistance with the MCP directory API, please join our Discord server