Skip to main content
POST
/
wp-json
/
getmcp
/
v1
/
servers
/
{server_id}
/
tools
/
{id}
/
test
curl --request POST \
     --url https://yoursite.com/wp-json/getmcp/v1/servers/836995ae-1cff-41ec-823e-a4f07ccca3a0/tools/5376af81-6bb8-4b01-800c-508d7672e394/test \
     --header 'Authorization: Bearer gmcp_your_api_key' \
     --header 'content-type: application/json' \
     --data '{
       "arguments": { "city": "London" },
       "use_test_credentials": true
     }'
{
  "outbound_request": {
    "method": "GET",
    "url": "https://wttr.in/London?format=j1",
    "headers": {
      "Accept": "application/json"
    },
    "body": null
  },
  "raw_response": {
    "status_code": 200,
    "headers": { "content-type": "application/json" },
    "body": "{ \"current_condition\": [ ... ] }"
  },
  "mcp_output": {
    "content": [
      { "type": "text", "text": "{\"current_condition\":[...]}" }
    ],
    "isError": false
  },
  "timing": {
    "total_ms": 342
  }
}
Runs the tool through the same execution pipeline that MCP clients hit, but with the admin “Test Tool” affordances: by default it uses the test credentials stored on the tool/server, surfaces the outbound HTTP request for inspection, and records last_tested_at / last_test_response_ms on success.
This is the endpoint that the Test button in the admin UI calls. Use it to validate a tool’s parameter mapping, headers, and response handling without going through an MCP client.
Draft and inactive tools cannot be tested — publish/activate them first or you’ll get a 422. Pass use_test_credentials: false to execute against production credentials instead of test credentials.

Path Parameters

server_id
string
required
The UUID of the server the tool belongs to (e.g. 836995ae-1cff-41ec-823e-a4f07ccca3a0). Numeric IDs are also accepted for backwards compatibility.
id
string
required
The UUID of the tool to test (e.g. 5376af81-6bb8-4b01-800c-508d7672e394). Numeric IDs are also accepted for backwards compatibility.

Body Parameters

arguments
object
Object of input arguments to pass to the tool. Keys must match the tool’s input_schema.properties. Defaults to {}.
use_test_credentials
boolean
default:"true"
When true (default), execute with test credentials so production keys aren’t put through experimentation. When false, execute against live production credentials — the same path an MCP client takes.
curl --request POST \
     --url https://yoursite.com/wp-json/getmcp/v1/servers/836995ae-1cff-41ec-823e-a4f07ccca3a0/tools/5376af81-6bb8-4b01-800c-508d7672e394/test \
     --header 'Authorization: Bearer gmcp_your_api_key' \
     --header 'content-type: application/json' \
     --data '{
       "arguments": { "city": "London" },
       "use_test_credentials": true
     }'
{
  "outbound_request": {
    "method": "GET",
    "url": "https://wttr.in/London?format=j1",
    "headers": {
      "Accept": "application/json"
    },
    "body": null
  },
  "raw_response": {
    "status_code": 200,
    "headers": { "content-type": "application/json" },
    "body": "{ \"current_condition\": [ ... ] }"
  },
  "mcp_output": {
    "content": [
      { "type": "text", "text": "{\"current_condition\":[...]}" }
    ],
    "isError": false
  },
  "timing": {
    "total_ms": 342
  }
}

Response Fields

outbound_request
object
The exact HTTP request that was dispatched to the upstream API — method, url, headers, body. Useful for verifying that parameter mapping and templating produced the URL/body you expected. null when the executor short-circuited before issuing a request.
raw_response
object
The unprocessed upstream response — status_code, headers, body (always a string). null on transport errors.
mcp_output
object
The MCP-shaped result that an MCP client would have received: { content: [{ type, text }], isError }. isError is true when the upstream returned a non-2xx status or the executor itself threw.
timing
object
{ total_ms: <int> } — wall-clock duration of the full test, including auth resolution and response mapping.

Status Codes

CodeMeaning
200Test ran. Check mcp_output.isError to distinguish upstream failure from success.
404Tool (or its parent server) not found.
422Tool status is draft or inactive — not testable in its current state.