---
title: "Unified MCP tool inspection"
method: POST
path: "/agents/mcp/inspect_tool"
tags: ["Agents"]
---

# Unified MCP tool inspection

`POST /agents/mcp/inspect_tool`

## Request

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

Unified endpoint for inspecting MCP tools. Supports three modes: (1) tool_id — inspect an existing local or remote MCP tool by database ID, (2) servers — inspect one or more remote MCP server configs (pre-add), (3) file_name + file_data_base64 — inspect an uploaded package (pre-add). Returns a list of per-server inspection results.

## Request body

- object
  - `tool_id` string, nullable: ID of an existing MCP tool to inspect
  - `servers` object, nullable: Map of server_name to server config for pre-add remote inspection
  - `file_name` string, nullable: Filename for pre-add upload inspection
  - `file_data_base64` string, nullable: Base64-encoded file content for pre-add upload inspection
  - `model` string, nullable: LLM model for security inspection

## Response `200`

Unified inspection result

- object
  - `status` string
  - `servers` object[]: Per-server inspection results
    - `status` string
    - `server_name` string
    - `server_type` string
    - `tools` object[]
      - `name` string
      - `description` string
      - `parameters` object
    - `tool_count` integer
    - `security` object, nullable
    - `error` string, nullable
    - `detection_method` string
  - `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)
