Skip to main content
Glama

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
NameRequiredDescriptionDefault
sessionIdYesSession identifier
limitNoMaximum number of requests to return (default: 100)

Implementation Reference

  • 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 };
  • 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',
          },

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/aj-bartocci/SpyNet'

If you have feedback or need assistance with the MCP directory API, please join our Discord server