Skip to main content
Glama
riker-t

Ramp Developer MCP Server

by riker-t

get_endpoint_schema

Retrieve OpenAPI schema for specific API endpoints to understand request parameters, response structures, and required fields for development.

Instructions

🎯 GET PRECISE ENDPOINT SCHEMA - Returns exact OpenAPI schema for specific endpoints.

Perfect for when you need: • Exact request parameter names and types • Response field names and structures
• Required vs optional parameters • Related endpoints for the same use case

Example queries this replaces: • "bills endpoint response schema fields amount vendor status" → Use this tool with /developer/v1/bills • "API pagination limit page_size next cursor" → Get schema for any paginated endpoint • "cards creation request parameters" → Use this tool with /developer/v1/cards

Usage: Provide an endpoint path (and optionally method) to get the complete technical specification.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endpointYesThe endpoint path (e.g., '/developer/v1/bills', '/developer/v1/limits')
methodNoHTTP method (GET, POST, PUT, etc.). If not specified, will show most relevant method.
include_relatedNoInclude related endpoints for the same use case

Implementation Reference

  • Main execution handler that parses input, finds matching endpoints, handles errors, and formats the schema response as TextContent.
    async def execute(self, arguments: Dict[str, Any]) -> List[TextContent]:
        """Execute schema retrieval"""
        endpoint = arguments.get("endpoint", "").strip()
        method = arguments.get("method", "").upper() if arguments.get("method") else None
        include_related = arguments.get("include_related", True)
        
        if not endpoint:
            return [TextContent(
                type="text",
                text="❌ Please provide an endpoint path (e.g., '/developer/v1/bills')"
            )]
        
        try:
            # Find matching endpoint(s)
            matching_endpoints = self._find_matching_endpoints(endpoint, method)
            
            if not matching_endpoints:
                similar = self._find_similar_endpoints(endpoint)
                suggestion_text = f"\n\n**Similar endpoints available:**\n" + "\n".join([f"• {ep}" for ep in similar[:5]]) if similar else ""
                
                return [TextContent(
                    type="text", 
                    text=f"❌ Endpoint not found: `{method + ' ' if method else ''}{endpoint}`{suggestion_text}"
                )]
            
            # Format the schema response
            result_text = self._format_endpoint_schemas(matching_endpoints, include_related)
            
            return [TextContent(type="text", text=result_text)]
            
        except Exception as e:
            return [TextContent(
                type="text",
                text=f"❌ Error retrieving schema: {str(e)}"
            )]
  • Input schema defining the tool's parameters: endpoint (required string), optional method (enum), and include_related (boolean).
    def input_schema(self) -> Dict[str, Any]:
        return {
            "type": "object",
            "properties": {
                "endpoint": {
                    "type": "string", 
                    "description": "The endpoint path (e.g., '/developer/v1/bills', '/developer/v1/limits')"
                },
                "method": {
                    "type": "string",
                    "description": "HTTP method (GET, POST, PUT, etc.). If not specified, will show most relevant method.",
                    "enum": ["GET", "POST", "PUT", "PATCH", "DELETE"]
                },
                "include_related": {
                    "type": "boolean",
                    "default": True,
                    "description": "Include related endpoints for the same use case"
                }
            },
            "required": ["endpoint"]
        }
  • src/server.py:46-51 (registration)
    Registration of GetEndpointSchemaTool instance in the server's tools list, passed to MCP server handlers.
    tools = [
        PingTool(),
        SearchDocumentationTool(knowledge_base),
        SubmitFeedbackTool(),
        GetEndpointSchemaTool(knowledge_base)
    ]
  • src/server.py:29-29 (registration)
    Import statement bringing GetEndpointSchemaTool into the server module.
    from tools import PingTool, SearchDocumentationTool, SubmitFeedbackTool, GetEndpointSchemaTool
  • Tool name property returning 'get_endpoint_schema', used for registration and invocation.
    def name(self) -> str:
        return "get_endpoint_schema"

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/riker-t/ramp-dev-mcp'

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