Skip to main content
Glama

get_injection_context

Retrieve a compact bundle of constraints and facts to re-inject after context loss, for use in PostCompact or UserPromptSubmit hooks.

Instructions

Return a compact constraint+fact bundle for PostCompact / UserPromptSubmit hooks to re-inject after context loss.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
max_factsNo
event_typeYes
project_hintNo
max_constraintsNo
Behavior2/5

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

No annotations are provided, so the description must carry the full burden. It only says 'Return...' without disclosing whether this is a read-only operation, any side effects, how 'compact' is achieved (e.g., truncation, filtering), or what happens if parameters like max_facts are omitted. This lack of behavioral detail is a significant gap.

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 a single, front-loaded sentence with no filler. It is concise and easy to read, though it sacrifices substance for brevity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With 4 parameters, zero schema coverage, no annotations, and no output schema, the description is insufficiently complete. It gives a high-level purpose but lacks details on parameter behavior, return format, and how this tool fits with alternatives. More context is needed for an agent to use it reliably.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate, but it does not. It mentions two of the three event_type values but does not explain max_facts, max_constraints, project_hint, or the SessionStart event. The term 'compact' weakly implies size limits, but no explicit parameter meaning is provided.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool returns a 'compact constraint+fact bundle' for specific hooks (PostCompact/UserPromptSubmit), which distinguishes it from sibling tools like query_fact or get_constraints. However, it could be more explicit about what 'context loss' entails or how it differs from get_context_for_action.

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 names specific trigger events (PostCompact/UserPromptSubmit) and the goal of re-injecting after context loss, giving clear context for when to use the tool. It does not explicitly mention alternatives or when not to use it, but the event-specific framing provides adequate guidance.

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

Install Server

Other Tools

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/SaravananJaichandar/etch-mcp'

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