get_repair_log
Retrieve detailed analysis logs from past repair operations by providing the session ID, enabling efficient review and troubleshooting of transcript repairs.
Instructions
Retrieves detailed analysis log from previous repair operation
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | Yes | Session ID or timestamp from previous repair |
Input Schema (JSON Schema)
{
"properties": {
"session_id": {
"description": "Session ID or timestamp from previous repair",
"type": "string"
}
},
"required": [
"session_id"
],
"type": "object"
}
Implementation Reference
- src/tools/repair.ts:131-147 (handler)The main execution function for the 'get_repair_log' tool. It constructs the log file path from the session_id and verifies its existence before returning the path.export async function getRepairLog(params: GetRepairLogParams): Promise<{ log_file: string }> { try { const { session_id } = params; const logPath = `/logs/repairs/${session_id}.log`; // Check if the log file exists try { await FileHandler.readTextFile(logPath); } catch (error) { throw new Error(`Repair log not found for session ${session_id}`); } return { log_file: logPath }; } catch (error) { throw new Error(`Failed to retrieve repair log: ${error instanceof Error ? error.message : String(error)}`); } }
- src/tools/repair.ts:15-17 (schema)TypeScript interface defining the input parameters (session_id) for the get_repair_log tool.export interface GetRepairLogParams { session_id: string; }
- src/index.ts:74-87 (registration)Registration of the 'get_repair_log' tool in the ListToolsRequestSchema response, including input JSON schema.{ name: 'get_repair_log', description: 'Retrieves detailed analysis log from previous repair operation', inputSchema: { type: 'object', properties: { session_id: { type: 'string', description: 'Session ID or timestamp from previous repair' } }, required: ['session_id'] } },
- src/index.ts:170-183 (registration)Dispatch handler in CallToolRequestSchema that validates input and invokes the getRepairLog function.case 'get_repair_log': // Validate required parameters if (!args || typeof args.session_id !== 'string') { throw new McpError(ErrorCode.InvalidParams, 'Missing required parameter: session_id'); } const logResult = await getRepairLog(args as unknown as GetRepairLogParams); return { content: [ { type: 'text', text: JSON.stringify(logResult, null, 2) } ] };