---
title: "List tools from MCP servers"
method: POST
path: "/agents/mcp/list_tools"
tags: ["Agents"]
---

# List tools from MCP servers

`POST /agents/mcp/list_tools`

## Request

- Base URL: `https://h2ogpte.genai.h2o.ai/api/v1`
- URL: `https://h2ogpte.genai.h2o.ai/api/v1/agents/mcp/list_tools`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/h2o/apis/h2ogpte-rest-api/docs/agents/mcp/list_tools/post.ts> (a function with typed inputs; its response is checked against the schema)

Lists tools from configured MCP servers, optionally filtered by config type and server names.

## Request body

- object
  - `config_type` string: Type of config ('runner' or 'creator')
  - `server_names` string[], nullable: Optional list of server names to filter
  - `mcp_dir` string, nullable: Override directory for MCP configs
  - `include_remote` boolean: Whether to include remote MCP servers

## Response `200`

Successful operation

- object
  - `status` string
  - `servers` object
  - `total_servers` integer
  - `total_tools` integer
  - `error` string, nullable

## Other responses

- `400`: Bad request
- `401`: Unauthorized - Invalid or missing API key
- `500`: Internal server error
- `default`: Unexpected error

---

[API](https://skmtc.dev/h2o/apis/h2ogpte-rest-api.md) - [All operations](https://skmtc.dev/h2o/apis/h2ogpte-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/h2o/apis/h2ogpte-rest-api/revisions/a82a117320f4?raw)
