get_request_history
Retrieve past HTTP request records from a SpyNet session to analyze API interactions and debug application behavior during development.
Instructions
Get request history for a session
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sessionId | Yes | Session identifier | |
| limit | No | Maximum number of requests to return (default: 100) |
Implementation Reference
- src/mcp/tools.ts:136-150 (handler)The actual implementation of the get_request_history tool, which retrieves request history from a session.
get_request_history: async (args: any) => { try { const { sessionId, limit = 100 } = args; if (!sessionId) { return { success: false, error: 'Missing required field: sessionId' }; } const session = sessionManager.getOrCreate(sessionId); const history = session.requestHistory.slice(-Math.min(limit, 1000)); return { success: true, data: history }; - src/mcp/server.ts:125-134 (registration)Registration of the get_request_history tool in the MCP server configuration.
{ name: 'get_request_history', description: 'Get request history for a session', inputSchema: { type: 'object', properties: { sessionId: { type: 'string', description: 'Session identifier', },