prepare_context
Build a task-specific, token-budgeted context pack from the most relevant pages: lexical rank, human-reviewed knowledge preferred, stale/deprecated concepts penalized, plus the top hits' link neighbors. Use it before multi-page product or coding work instead of many search/get_page calls.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"task": "<task>"
},
"name": "prepare_context"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| task | Yes | The concrete task or question | |
| keywords | No | Synonyms, and the workspace's language (e.g. English terms for a Turkish task) | |
| maxTokens | No | Budget for the returned JSON, approx. tokens | |
| maxConcepts | No | ||
| trustPolicy | No | prefer-human-reviewed | |
| includeRelated | No | Add title/id refs from the top concepts' link neighborhoods |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| task | Yes | ||
| policy | Yes | ||
| profile | Yes | ||
| related | Yes | ||
| concepts | Yes | ||
| handling | Yes | ||
| warnings | Yes | ||
| expiresAt | No | ||
| retrieval | Yes | ||
| truncated | Yes | ||
| budgetTokens | Yes | ||
| contextRunId | No | ||
| estimatedTokens | Yes |