context_get
Retrieve complete details of a specific context by its ID to access saved information across sessions.
Instructions
Get full details of a specific context by ID
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| context_id | Yes | Context ID |
Input Schema (JSON Schema)
{
"properties": {
"context_id": {
"description": "Context ID",
"type": "string"
}
},
"required": [
"context_id"
],
"type": "object"
}
Implementation Reference
- src/mcp_server/server.py:404-410 (handler)The handler implementation for the 'context_get' tool. It extracts the context_id from arguments, fetches the context from storage, returns a not found message if missing, otherwise formats the context details and returns as TextContent.if name == "context_get": context_id = arguments["context_id"] context = self.storage.get_context(context_id) if not context: return [TextContent(type="text", text=f"Context {context_id} not found")] result = self._format_context_detail(context) return [TextContent(type="text", text=result)]
- src/mcp_server/server.py:136-142 (schema)The input schema defining the required 'context_id' parameter for the 'context_get' tool.inputSchema={ "type": "object", "properties": { "context_id": {"type": "string", "description": "Context ID"}, }, "required": ["context_id"], },
- src/mcp_server/server.py:133-143 (registration)The registration of the 'context_get' tool in the list_tools method, which defines its name, description, and input schema.Tool( name="context_get", description="Get full details of a specific context by ID", inputSchema={ "type": "object", "properties": { "context_id": {"type": "string", "description": "Context ID"}, }, "required": ["context_id"], }, ),