Skip to main content
Glama

get_endpoint_schema

Retrieve detailed schema information for specific API endpoints to understand required parameters and expected responses.

Instructions

Get the full schema for a specific endpoint. Use this to get detailed parameter and response information.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
api_idYesThe API identifier
endpoint_idYesThe endpoint identifier (e.g., 'GET /users/{id}')

Implementation Reference

  • The handler method that implements the logic for getting the endpoint schema.
    async def _get_endpoint_schema(self, args: dict[str, Any]) -> ToolResult:
        """Get schema for a specific endpoint."""
        api_id = args["api_id"]
        endpoint_id = args["endpoint_id"]
    
        endpoint = self.spec_store.get_endpoint(api_id, endpoint_id)
        if not endpoint:
            return ToolResult(
                success=False,
                data=None,
                error=f"Endpoint not found: {endpoint_id}",
            )
    
        schema = self.schema_formatter.format_endpoint(endpoint)
        call_details = self.schema_formatter.format_endpoint_for_call(endpoint)
    
        # Get dependencies
        dependencies = self.graph_store.get_dependencies(api_id, endpoint_id)
    
        return ToolResult(
            success=True,
            data={
                "endpoint_id": endpoint_id,
                "schema": schema,
                "call_details": call_details,
                "dependencies": dependencies,
            },
        )
  • Input validation schema for the get_endpoint_schema tool.
    class GetEndpointSchemaInput(BaseModel):
        """Input for get_endpoint_schema tool."""
    
        api_id: str = Field(
            ...,
            description="The API identifier",
            min_length=1,
        )
        endpoint_id: str = Field(
            ...,
            description="The endpoint identifier (e.g., 'GET /users/{id}')",
            min_length=1,
  • Registration of the get_endpoint_schema tool handler in the tool set.
    "get_endpoint_schema": self._get_endpoint_schema,
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It fails to indicate whether this is a safe/idempotent read operation, what format the schema is returned in, or whether there are rate limits or caching considerations. It only repeats the functional purpose.

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

Conciseness5/5

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

The description consists of two efficient sentences with zero waste. It is front-loaded with the action ('Get the full schema') followed immediately by usage context, making it easy for an agent to parse quickly.

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

Completeness3/5

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

Given the tool's simplicity (2 parameters, no nested objects) and 100% schema coverage, the description is minimally adequate. However, since no output schema exists, the description could have been more specific about the return structure beyond 'detailed parameter and response information.'

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?

The input schema has 100% description coverage ('The API identifier' and 'The endpoint identifier'), establishing a baseline of 3. The description adds minimal parameter semantics beyond referencing 'a specific endpoint,' relying entirely on the schema to document the parameter purposes and format.

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 tool retrieves 'the full schema for a specific endpoint' with specific verb (get) and resource (schema). It implies distinction from sibling 'search_endpoints' by emphasizing 'full schema' and 'detailed' information versus listing, though it doesn't explicitly name the alternative.

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

Usage Guidelines3/5

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

The second sentence provides implied usage guidance ('Use this to get detailed parameter and response information'), suggesting when to invoke it. However, it lacks explicit 'when not to use' guidance or comparison to siblings like 'call_api' or 'search_endpoints' that might be confused for this use case.

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/nk3750/jitapi'

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