Context Prepare
context_preparePre-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
| Name | Required | Description | Default |
|---|---|---|---|
| repo | No | Workspace slug for scoped recall enrichment. | |
| enrich | No | Assemble org memory and append as `additional_context`. | |
| github | No | GitHub `owner/repo` for scoped recall enrichment. | |
| prompt | No | Latest user prompt when you do not have full message history. | |
| messages | No | OpenAI-style chat messages to run through the pre-LLM pipeline. Provide this or `prompt`. | |
| session_id | No | Working-memory session to append the user turn to. | |
| token_budget | No | Soft token cap for assembled context. | |
| append_session | No | Append the latest user message to the working session. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||