Skip to main content
Glama

api_request

Execute custom API requests to SD Elements endpoints using specified HTTP methods, endpoints, parameters, and body data for integration with the security development lifecycle platform.

Instructions

Make a custom API request to any SD Elements endpoint

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNoRequest body data as key-value pairs
endpointYesAPI endpoint (e.g., 'projects/', 'applications/123/')
methodYesHTTP method for the request
paramsNoURL parameters as key-value pairs

Implementation Reference

  • The main handler function for the 'api_request' tool. It is decorated with @mcp.tool() which registers it automatically. The function makes a generic API request using the global api_client and returns JSON-formatted result.
    @mcp.tool() async def api_request(ctx: Context, method: str, endpoint: str, params: Optional[Dict[str, Any]] = None, data: Optional[Dict[str, Any]] = None) -> str: """Make a generic API request to a custom endpoint. Use when user says 'make a GET/POST/PUT/DELETE request', 'call API endpoint', or 'custom API call'. Do NOT use for specific operations - use dedicated tools like get_project instead.""" global api_client if api_client is None: api_client = init_api_client() result = api_client.api_request(method, endpoint, params, data) return json.dumps(result, indent=2)
  • Import of the tools module which triggers registration of all tools including api_request via their @mcp.tool() decorators.
    from . import tools # noqa: F401
  • Import of generic.py which registers the api_request tool via @mcp.tool() decorator.
    from .generic import *

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/geoffwhittington/sde-mcp'

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