Skip to main content
Glama

list_endpoints

Display configured REST and WebSocket endpoints for a SpyNet session to inspect mock server setup during application testing.

Instructions

List configured endpoints for a session

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sessionIdYesSession identifier

Implementation Reference

  • The handler implementation for the list_endpoints tool.
    list_endpoints: async (args: any) => {
      try {
        const { sessionId } = args;
    
        if (!sessionId) {
          return {
            success: false,
            error: 'Missing required field: sessionId'
          };
        }
    
        const session = sessionManager.getOrCreate(sessionId);
        const endpoints = Array.from(session.endpoints.values());
    
        return { success: true, data: endpoints };
      } catch (error: any) {
        return {
          success: false,
          error: `Failed to list endpoints: ${error.message}`
        };
      }
    },
  • The tool registration and schema definition for list_endpoints.
      name: 'list_endpoints',
      description: 'List configured endpoints for a session',
      inputSchema: {
        type: 'object',
        properties: {
          sessionId: {
            type: 'string',
            description: 'Session identifier',
          },
        },
        required: ['sessionId'],
      },
    },
    {

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