context
Compiles active facts, preferences, and rules into prompt-ready Markdown within a character budget for AI agent prompts, controlling memory size.
Instructions
Compile active facts, preferences, and rules into prompt-ready Markdown within a character budget. Use for agent context; use list_facts to inspect individual records. Project scope requires initialized project memory; global scope excludes project content. Persists a generated summary and audit event, so repeated calls create new records even with identical arguments. Returns context_markdown, included fact IDs, size information, and the summary metadata.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "context"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scope | No | Storage scope: project uses this workspace; global uses user memory. Defaults to project. | project |
| max_size_chars | No | Maximum compiled Markdown length in characters, including headings. Defaults to 4000; values below the 110-character template minimum fail. | |
| agent_session_key | No | Optional caller session correlation key included in the audit event. Omitted leaves it unset; do not include secrets. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||