Skip to main content
Glama

inject_context

Inject curated context into conversations to restore important information after pruning or to seed a session with relevant knowledge. Keeps injected content natural-sounding to avoid detection.

Instructions

Inject curated context into the conversation as a new branch. Use to restore important context after pruning or to seed a session with relevant knowledge. Auto-triggers /resume via the dashboard if available. Keep injected content natural-sounding — avoid markers like [INJECTED] that trigger prompt injection detection.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentYesThe context to inject. Should be natural-sounding (avoid markers like [INJECTED] that trigger prompt injection detection). Can be formatted as pasted text, MCP responses, or conversation summaries.
sessionNoTmux session name to send /resume to. If omitted, looks up by conversation ID via dashboard.
prune_orphansNoIf true, delete orphaned messages after injection to reduce file size. Default: false.
conversation_idNoConversation UUID. If omitted, finds the most recently modified conversation for the current project. Your conversation ID is shown in your status bar as [xxxxxxxx].

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.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. It discloses the branch creation behavior, the auto-/resume trigger via dashboard, and the prompt injection detection concern with guidance to avoid markers. This is meaningful behavioral context beyond what structured fields would provide. It doesn't mention destructive aspects of prune_orphans, which would have been useful.

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?

Three sentences, front-loaded with the core purpose. Each sentence earns its place: purpose+branch, use case, behavioral constraint. Could arguably merge the injection-detection note into the schema description since the schema repeats it, but the duplication is minor.

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 4-param tool with 100% schema coverage and no output schema, the description adds meaningful context: branch semantics, dashboard auto-trigger, and the injection-detection constraint. It's complete enough for an agent to select and invoke correctly. A minor gap is the lack of clarity on what 'new branch' means for existing context flow and whether it replaces or adds to current state.

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 100%, so the baseline is 3. The description adds value by explaining the natural-sounding content requirement (prompt injection detection) and the conversation ID lookup fallback behavior. The prune_orphans deletion semantics are disclosed. Slight gap: doesn't clarify how 'new branch' interacts with the session parameter.

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 states a specific verb+resource ('Inject curated context into the conversation as a new branch') with clear intent (restoring context after pruning or seeding sessions). It distinguishes from siblings like restore_context and compact_context by clarifying this creates a new branch rather than replacing or compacting existing context.

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 clear when-to-use guidance: 'restore important context after pruning or seed a session with relevant knowledge.' It implies alternatives exist (restore_context for actual restores, compact_context for compaction) though it doesn't explicitly name them as exclusions. The dashboard auto-trigger behavior is also disclosed.

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