Skip to main content
Glama

Context Prepare

context_prepare

Pre-LLM pipeline: session append → compress incoming history → enrich.

Returns compressed messages, optional additional_context (org memory), session_id, and stats. Use before sending a turn to your LLM when you want teamshared to shrink tool bloat and inject recall. Server-side MCP middleware already normalizes teamshared tool responses; this covers the rest of the prompt.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repoNoWorkspace slug for scoped recall enrichment.
enrichNoAssemble org memory and append as `additional_context`.
githubNoGitHub `owner/repo` for scoped recall enrichment.
promptNoLatest user prompt when you do not have full message history.
messagesNoOpenAI-style chat messages to run through the pre-LLM pipeline. Provide this or `prompt`.
session_idNoWorking-memory session to append the user turn to.
token_budgetNoSoft token cap for assembled context.
append_sessionNoAppend the latest user message to the working session.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

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

  1. First observed

TDQS

A3.9/5.0
Behavior3/5

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

With no annotations, the description carries the transparency burden. It discloses the operation sequence (appends to session, compresses history, enriches) and the output shape, which implies the tool transforms context and may write to working memory. It does not state persistence, reversibility, or behavior when neither messages nor prompt is provided.

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 compact sentences with the pipeline summary first, followed by output and usage context. It is efficient, though the arrow-notation pipeline and 'teamsmarted' jargon require the reader to already know the domain.

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?

Given 8 optional parameters, a full output schema, and no annotations, the description supplies the needed usage context and a clear invocation trigger. It could more explicitly distinguish itself from close siblings like context_compress or memory_assemble_context, but the 'before sending a turn' guidance is sufficient for most cases.

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 baseline is the correct anchor. The description adds strategic context (why to use it, what it returns) rather than per-parameter explanations; the individual parameters are already well documented in the schema.

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 a specific pipeline (session append → compress → enrich) and the concrete return payload (messages, optional additional_context, session_id, stats). It also scopes itself against sibling tooling by stating that server-side MCP middleware handles teamshared tool normalization and 'this covers the rest of the prompt.'

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 explicitly says 'Use before sending a turn to your LLM' and gives the condition (want teamshared to shrink tool bloat and inject recall). It does not name an alternative tool explicitly, but the middleware statement provides a boundary against normalization-focused siblings.

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.

TDQS

B3.4/5.0
Disambiguation4/5

With 104 tools across many domains (memory, work, projects, files, agents, context, strategic, ontology), the use of clear prefixes (memory_, work_, project_, file_, agent_run_, context_) makes most tools distinct. However, there are some potential confusions between memory_session_* vs memory_state_*, and memory_recall vs memory_think vs memory_assemble_context, though descriptions clarify their specific purposes. Aliases like memory_playbook_get for memory_procedure_get are explicit and reduce ambiguity.

Naming Consistency5/5

Tool names follow a highly consistent pattern: prefix_domain_action (e.g., file_create, work_update, memory_recall, agent_run_start). All use snake_case, with verbs consistently placed after the domain prefix. Even less common tools like account_brief and attention_snapshot fit the overall naming scheme, making the set predictable and easy to navigate.

Tool Count3/5

At 104 tools, this is an exceptionally large surface area, far exceeding the 25+ threshold that feels heavy. However, the server covers an extensive domain (organizational memory, work management, project tracking, file sharing, agent orchestration, and strategic planning), which justifies a large count. Still, the sheer number may overwhelm agents, and some tools could be consolidated (e.g., many memory_session_* and memory_state_* variants).

Completeness4/5

The tool surface is remarkably complete for its stated purpose, covering CRUD operations for files, work items, projects, and memory, plus lifecycle management for agents, sessions, and strategic plans. Minor gaps exist (e.g., no direct memory_item_get by ID, no section removal in projects), but agents can work around these using existing tools like memory_recall or work_create with parent_id. Overall, the set minimizes dead ends.