Answer from documentation (RAG)
answer_questionAnswers questions directly from local Markdown docs by retrieving the top-k relevant sections and returning numbered citations, grounding responses in exact documentation instead of model memory.
Instructions
Retrieve the top-k sections for a question and answer with numbered citations. Uses MCP sampling when the client supports it; otherwise returns the grounded context for the caller's model.
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": {
"question": "<question>"
},
"name": "answer_question"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| k | No | ||
| question | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | ||
| answer | Yes | ||
| context | Yes | ||
| citations | Yes |