Skip to main content
POST
/
wp-json
/
getmcp
/
v1
/
servers
/
{server_id}
/
tools
curl --request POST \
     --url https://yoursite.com/wp-json/getmcp/v1/servers/836995ae-1cff-41ec-823e-a4f07ccca3a0/tools \
     --header 'Authorization: Bearer gmcp_your_api_key' \
     --header 'content-type: application/json' \
     --data '
{
  "name": "create_customer",
  "description": "Create a new customer in Stripe",
  "endpoint_url": "https://api.stripe.com/v1/customers",
  "http_method": "POST",
  "input_schema": {
    "type": "object",
    "properties": {
      "email": {
        "type": "string",
        "format": "email",
        "description": "Customer email address"
      },
      "name": {
        "type": "string",
        "description": "Customer full name"
      }
    },
    "required": ["email"]
  },
  "parameter_mapping": {
    "email": {"target": "body"},
    "name": {"target": "body"}
  },
  "timeout": 30,
  "status": "active"
}
'
{
  "id": 5,
  "uuid": "5376af81-6bb8-4b01-800c-508d7672e394",
  "server_id": 1,
  "name": "create_customer",
  "description": "Create a new customer in Stripe",
  "endpoint_url": "https://api.stripe.com/v1/customers",
  "http_method": "POST",
  "input_schema": {
    "type": "object",
    "properties": {
      "email": {"type": "string", "format": "email"},
      "name": {"type": "string"}
    },
    "required": ["email"]
  },
  "parameter_mapping": {
    "email": {"target": "body", "key": "email"},
    "name": {"target": "body", "key": "name"}
  },
  "response_mapping": {
    "selector": "",
    "format": "json",
    "template": ""
  },
  "headers": null,
  "cache_ttl": 0,
  "timeout": 30,
  "rate_limit_per_min": 60,
  "retry_count": 0,
  "retry_backoff": "exponential",
  "sort_order": 0,
  "status": "active",
  "tags": [],
  "last_tested_at": null,
  "last_test_response_ms": null,
  "server_uuid": "836995ae-1cff-41ec-823e-a4f07ccca3a0",
  "server_hex": "a1b2c3d4e5f6a1b2",
  "created_at": "2025-03-18T10:00:00",
  "updated_at": "2025-03-18T10:00:00"
}

Documentation Index

Fetch the complete documentation index at: https://docs.getmcp.com/llms.txt

Use this file to discover all available pages before exploring further.

Path Parameters

server_id
string
required
The UUID of the server to add the tool to (e.g. 836995ae-1cff-41ec-823e-a4f07ccca3a0). Numeric IDs are also accepted for backwards compatibility.

Body Parameters

name
string
required
Machine-readable tool name used by AI clients (e.g., get_weather). Use snake_case.
description
string
Human-readable description. AI clients use this to decide when to call the tool.
endpoint_url
string
The HTTP URL to call when the tool is invoked. Supports {param} path placeholders.
http_method
string
default:"GET"
HTTP method. One of: GET, POST, PUT, PATCH, DELETE.
input_schema
object
JSON Schema object defining accepted input parameters.
auth_type
string
default:"none"
Outbound auth type for calling the external API. One of: none, api-key, bearer, basic, oauth2.
parameter_mapping
object
Maps input parameters to their location in the outbound HTTP request. Each key is a parameter name; the value is an object with:
  • target (string, required): where to place the value — path, query, body, or header.
  • key (string, optional): the key name to use in the request. Defaults to the parameter name.
Example: {"city": {"target": "query", "key": "q"}} sends city as ?q=London.
headers
object
Custom HTTP headers to include in every request to the external API.
cache_ttl
integer
default:"0"
Cache response for N seconds. Set to 0 to disable.
timeout
integer
default:"30"
Request timeout in seconds.
retry_count
integer
default:"0"
Number of automatic retries on failure (0–5). Retries on connection errors and HTTP status codes 408, 429, 500, 502, 503, 504.
retry_backoff
string
default:"exponential"
Delay strategy between retries. One of: none (retry immediately), linear (1s, 2s, 3s…), exponential (1s, 2s, 4s…).
status
string
default:"active"
Tool status. One of: active, paused.
curl --request POST \
     --url https://yoursite.com/wp-json/getmcp/v1/servers/836995ae-1cff-41ec-823e-a4f07ccca3a0/tools \
     --header 'Authorization: Bearer gmcp_your_api_key' \
     --header 'content-type: application/json' \
     --data '
{
  "name": "create_customer",
  "description": "Create a new customer in Stripe",
  "endpoint_url": "https://api.stripe.com/v1/customers",
  "http_method": "POST",
  "input_schema": {
    "type": "object",
    "properties": {
      "email": {
        "type": "string",
        "format": "email",
        "description": "Customer email address"
      },
      "name": {
        "type": "string",
        "description": "Customer full name"
      }
    },
    "required": ["email"]
  },
  "parameter_mapping": {
    "email": {"target": "body"},
    "name": {"target": "body"}
  },
  "timeout": 30,
  "status": "active"
}
'
{
  "id": 5,
  "uuid": "5376af81-6bb8-4b01-800c-508d7672e394",
  "server_id": 1,
  "name": "create_customer",
  "description": "Create a new customer in Stripe",
  "endpoint_url": "https://api.stripe.com/v1/customers",
  "http_method": "POST",
  "input_schema": {
    "type": "object",
    "properties": {
      "email": {"type": "string", "format": "email"},
      "name": {"type": "string"}
    },
    "required": ["email"]
  },
  "parameter_mapping": {
    "email": {"target": "body", "key": "email"},
    "name": {"target": "body", "key": "name"}
  },
  "response_mapping": {
    "selector": "",
    "format": "json",
    "template": ""
  },
  "headers": null,
  "cache_ttl": 0,
  "timeout": 30,
  "rate_limit_per_min": 60,
  "retry_count": 0,
  "retry_backoff": "exponential",
  "sort_order": 0,
  "status": "active",
  "tags": [],
  "last_tested_at": null,
  "last_test_response_ms": null,
  "server_uuid": "836995ae-1cff-41ec-823e-a4f07ccca3a0",
  "server_hex": "a1b2c3d4e5f6a1b2",
  "created_at": "2025-03-18T10:00:00",
  "updated_at": "2025-03-18T10:00:00"
}