---
title: "Test an MCP server tool"
method: POST
path: "/v2/mcp-servers/{id}/tools:test"
tags: ["MCP Gateway"]
---

# Test an MCP server tool

`POST /v2/mcp-servers/{id}/tools:test`

Executes a single tool on an upstream MCP server for testing. Connects to the server, invokes the tool with the provided arguments, and returns the result.

## Path parameters

- `id` string, required

## Request body

- TestMcpServerToolRequest
  - `tool_name` string, required — Bare upstream tool name, not a gateway's namespaced `exposed_name`.
  - `arguments` object — Arguments passed to the tool, matching its `input_schema`.
  - `discovery_variables` object — Values for the server's `template_variables`; treated as sensitive and not persisted.

## Response `200`

OK

- TestMcpServerToolResponse
  - `result` McpGatewayToolTestResult
    - `ok` boolean — Whether the tool call completed successfully.
    - `result` object — Payload returned by the upstream tool.
    - `latency_ms` integer — Round trip time of the tool call in milliseconds.
    - `error_message` string — Human-readable reason the call failed.
    - `errors` string[] — Additional failure details collected during the call.

---

[API](https://skmtc.net/orq-ai/apis/orq-ai-api.md) · [All operations](https://skmtc.net/orq-ai/apis/orq-ai-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/orq-ai/orq-ai-api/revisions/bfc2662b4090/schema)
