Skip to content

List MCP Server Tools

GET/api/mcp/:model_name/tools

Returns the list of tools, prompts, and resources exposed by a specific MCP server. Use this endpoint to discover what capabilities a server provides before connecting via SSE.

Authentication

EndpointAuth Required
GET /api/mcp/:model_name/toolsNo — public access
GET /api/mcp/tools?name=:model_nameNo — public access

Both URL forms resolve to the same handler. Use whichever is more convenient for your client.

Path Parameters

ParameterTypeRequiredDescription
model_namestringYesThe unique server identifier (e.g. exa/exa). Obtain this from the List MCP Servers endpoint.

Query Parameters

ParameterTypeRequiredDescription
namestringConditionalServer identifier — required only when using the /api/mcp/tools form instead of the path parameter variant.

Response

Returns the tools, prompts, and resources arrays from the server's unified schema, wrapped in the standard response envelope.

Response Fields

FieldTypeDescription
codeinteger0 on success
data.toolsarrayArray of MCP tool objects
data.promptsarrayArray of MCP prompt objects (may be empty)
data.resourcesarrayArray of MCP resource objects (may be empty)
messagestring"ok" on success

Tool Object

FieldTypeDescription
namestringTool identifier (e.g. web_search, run_sql)
descriptionstringHuman-readable description of what the tool does
inputSchemaobject | nullJSON Schema describing the tool's input parameters

Prompt Object

FieldTypeDescription
namestringPrompt identifier
descriptionstringHuman-readable description of the prompt

Resource Object

FieldTypeDescription
namestringResource identifier
descriptionstringHuman-readable description of the resource
uristringResource URI

Example Request

bash
# Using path parameter
curl "https://api.sandbase.ai/api/mcp/exa/exa/tools"

# Using query parameter
curl "https://api.sandbase.ai/api/mcp/tools?name=exa/exa"

Example Response

json
{
  "code": 0,
  "data": {
    "tools": [
      {
        "name": "web_search",
        "description": "Search the web using Exa's neural search engine. Returns clean, structured results optimized for AI consumption.",
        "inputSchema": {
          "type": "object",
          "properties": {
            "query": {
              "type": "string",
              "description": "The search query"
            },
            "num_results": {
              "type": "integer",
              "description": "Number of results to return (1-10)",
              "default": 5
            },
            "type": {
              "type": "string",
              "enum": ["neural", "keyword"],
              "description": "Search type",
              "default": "neural"
            }
          },
          "required": ["query"]
        }
      },
      {
        "name": "find_similar",
        "description": "Find web pages similar to a given URL.",
        "inputSchema": {
          "type": "object",
          "properties": {
            "url": {
              "type": "string",
              "description": "The URL to find similar pages for"
            },
            "num_results": {
              "type": "integer",
              "description": "Number of results to return",
              "default": 5
            }
          },
          "required": ["url"]
        }
      }
    ],
    "prompts": [],
    "resources": []
  },
  "message": "ok"
}

Error Responses

StatusError CodeDescription
400invalid_requestMissing model_name path parameter and name query parameter
404not_foundServer does not exist or is not an MCP-type model
500internal_errorFailed to parse the server's schema

Error Examples

json
{
  "error": "invalid_request",
  "message": "model_name is required"
}
json
{
  "error": "not_found",
  "message": "MCP server not found: invalid/server"
}

Notes

  • The inputSchema field follows JSON Schema format and describes the parameters your agent should pass when calling the tool via the SSE Proxy endpoint.
  • Servers with no tools will return an empty tools array ([]), not null.
  • The prompts and resources arrays follow the MCP protocol specification and may be empty for servers that only expose tools.