Skip to main content
Glama
gyuco
by gyuco

get_endpoint_info

Retrieve detailed information for a specific REST API endpoint by providing its path and HTTP method.

Instructions

Get detailed information about a specific endpoint

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesEndpoint path
methodYesHTTP method

Implementation Reference

  • The getEndpointInfo handler method in the McpRestServer class - validates restClient exists, extracts path/method from args, calls restClient.getEndpointInfo(), and returns the result as text content.
    private async getEndpointInfo(args: any) {
      if (!this.restClient) {
        throw new Error(
          "REST client not configured. Use configure_rest_client tool or provide configuration via CLI/environment variables."
        );
      }
    
      const { path, method } = args;
      const info = this.restClient.getEndpointInfo(path, method);
      return {
        content: [
          {
            type: "text",
            text: info,
          },
        ],
      };
    }
  • Tool registration with inputSchema - defines get_endpoint_info with required 'path' (string) and 'method' (string) parameters.
    {
      name: "get_endpoint_info",
      description: "Get detailed information about a specific endpoint",
      inputSchema: {
        type: "object",
        properties: {
          path: {
            type: "string",
            description: "Endpoint path",
          },
          method: {
            type: "string",
            description: "HTTP method",
          },
        },
        required: ["path", "method"],
      },
    },
  • src/index.ts:237-238 (registration)
    Tool routing in CallToolRequestSchema handler - routes 'get_endpoint_info' calls to this.getEndpointInfo(args).
    case "get_endpoint_info":
      return await this.getEndpointInfo(args);
  • The RestClient.getEndpointInfo method that delegates to SwaggerDocumentationParser.getEndpoint() and formats the endpoint details (summary, description, parameters) into a readable string.
    getEndpointInfo(path: string, method: string): string {
      if (!this.swaggerParser) {
        return "Swagger documentation not configured";
      }
    
      const endpoint = this.swaggerParser.getEndpoint(path, method);
      if (!endpoint) {
        return `Endpoint ${method} ${path} not found`;
      }
    
      let info = `${endpoint.method} ${endpoint.path}\n`;
      if (endpoint.summary) info += `Summary: ${endpoint.summary}\n`;
      if (endpoint.description) info += `Description: ${endpoint.description}\n`;
    
      if (endpoint.parameters && endpoint.parameters.length > 0) {
        info += "\nParameters:\n";
        endpoint.parameters.forEach((param) => {
          info += `  - ${param.name} (${param.in})${
            param.required ? " *required*" : ""
          }: ${param.description || "No description"}\n`;
        });
      }
    
      return info;
    }
  • The SwaggerDocumentationParser.getEndpoint method - the lowest-level lookup that finds a SwaggerEndpoint by path and method in the parsed endpoints array.
    getEndpoint(path: string, method: string): SwaggerEndpoint | undefined {
      return this.endpoints.find(
        (endpoint) =>
          endpoint.path === path &&
          endpoint.method.toLowerCase() === method.toLowerCase()
      );
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, and the description does not disclose behavioral traits such as read-only nature, authentication requirements, or side effects. The single sentence is insufficient for transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise at one sentence, which is efficient. However, it lacks front-loading of critical details and could be structured to include more context without losing conciseness.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of output schema and annotations, the description is too minimal. It does not explain what 'detailed information' entails or how the response is structured, leaving the agent underinformed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3. The description does not add meaning beyond the schema's parameter descriptions. No further elaboration on path or method format is given.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Get' and the resource 'detailed information about a specific endpoint', distinguishing it from siblings like 'search_endpoints' (search) and 'get_swagger_documentation' (whole documentation). However, it could be more specific about what 'detailed information' includes.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives like 'search_endpoints' or when not to use it. The description lacks context for decision-making.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/gyuco/mcp-http-client'

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