curl --request POST \
--url https://yoursite.com/wp-json/getmcp/v1/servers/836995ae-1cff-41ec-823e-a4f07ccca3a0/tools/reorder \
--header 'Authorization: Bearer gmcp_your_api_key' \
--header 'content-type: application/json' \
--data '{
"tool_ids": [
"5376af81-6bb8-4b01-800c-508d7672e394",
"e7a3c1d2-4f5b-6a7c-8d9e-0f1a2b3c4d5e",
"1a2b3c4d-5e6f-7081-92a3-b4c5d6e7f809"
]
}'
import requests
response = requests.post(
"https://yoursite.com/wp-json/getmcp/v1/servers/836995ae-1cff-41ec-823e-a4f07ccca3a0/tools/reorder",
headers={
"Authorization": "Bearer gmcp_your_api_key",
"Content-Type": "application/json",
},
json={
"tool_ids": [
"5376af81-6bb8-4b01-800c-508d7672e394",
"e7a3c1d2-4f5b-6a7c-8d9e-0f1a2b3c4d5e",
]
},
)
print(response.json())
const response = await fetch(
"https://yoursite.com/wp-json/getmcp/v1/servers/836995ae-1cff-41ec-823e-a4f07ccca3a0/tools/reorder",
{
method: "POST",
headers: {
"Authorization": "Bearer gmcp_your_api_key",
"Content-Type": "application/json",
},
body: JSON.stringify({
tool_ids: [
"5376af81-6bb8-4b01-800c-508d7672e394",
"e7a3c1d2-4f5b-6a7c-8d9e-0f1a2b3c4d5e",
],
}),
}
);
const data = await response.json();
$response = wp_remote_post(
"https://yoursite.com/wp-json/getmcp/v1/servers/836995ae-1cff-41ec-823e-a4f07ccca3a0/tools/reorder",
[
"headers" => [
"Authorization" => "Bearer gmcp_your_api_key",
"Content-Type" => "application/json",
],
"body" => wp_json_encode([
"tool_ids" => [
"5376af81-6bb8-4b01-800c-508d7672e394",
"e7a3c1d2-4f5b-6a7c-8d9e-0f1a2b3c4d5e",
],
]),
]
);
$data = json_decode( wp_remote_retrieve_body( $response ), true );
{
"reordered": true
}
{
"code": "getmcp_invalid_params",
"message": "tool_ids must be an array of tool UUIDs.",
"data": { "status": 400 }
}
{
"code": "getmcp_not_found",
"message": "Server not found.",
"data": { "status": 404 }
}
Tools
Reorder Tools
Set the sort order of tools within a server.
POST
/
wp-json
/
getmcp
/
v1
/
servers
/
{server_id}
/
tools
/
reorder
curl --request POST \
--url https://yoursite.com/wp-json/getmcp/v1/servers/836995ae-1cff-41ec-823e-a4f07ccca3a0/tools/reorder \
--header 'Authorization: Bearer gmcp_your_api_key' \
--header 'content-type: application/json' \
--data '{
"tool_ids": [
"5376af81-6bb8-4b01-800c-508d7672e394",
"e7a3c1d2-4f5b-6a7c-8d9e-0f1a2b3c4d5e",
"1a2b3c4d-5e6f-7081-92a3-b4c5d6e7f809"
]
}'
import requests
response = requests.post(
"https://yoursite.com/wp-json/getmcp/v1/servers/836995ae-1cff-41ec-823e-a4f07ccca3a0/tools/reorder",
headers={
"Authorization": "Bearer gmcp_your_api_key",
"Content-Type": "application/json",
},
json={
"tool_ids": [
"5376af81-6bb8-4b01-800c-508d7672e394",
"e7a3c1d2-4f5b-6a7c-8d9e-0f1a2b3c4d5e",
]
},
)
print(response.json())
const response = await fetch(
"https://yoursite.com/wp-json/getmcp/v1/servers/836995ae-1cff-41ec-823e-a4f07ccca3a0/tools/reorder",
{
method: "POST",
headers: {
"Authorization": "Bearer gmcp_your_api_key",
"Content-Type": "application/json",
},
body: JSON.stringify({
tool_ids: [
"5376af81-6bb8-4b01-800c-508d7672e394",
"e7a3c1d2-4f5b-6a7c-8d9e-0f1a2b3c4d5e",
],
}),
}
);
const data = await response.json();
$response = wp_remote_post(
"https://yoursite.com/wp-json/getmcp/v1/servers/836995ae-1cff-41ec-823e-a4f07ccca3a0/tools/reorder",
[
"headers" => [
"Authorization" => "Bearer gmcp_your_api_key",
"Content-Type" => "application/json",
],
"body" => wp_json_encode([
"tool_ids" => [
"5376af81-6bb8-4b01-800c-508d7672e394",
"e7a3c1d2-4f5b-6a7c-8d9e-0f1a2b3c4d5e",
],
]),
]
);
$data = json_decode( wp_remote_retrieve_body( $response ), true );
{
"reordered": true
}
{
"code": "getmcp_invalid_params",
"message": "tool_ids must be an array of tool UUIDs.",
"data": { "status": 400 }
}
{
"code": "getmcp_not_found",
"message": "Server not found.",
"data": { "status": 404 }
}
Atomically writes the new
sort_order for every tool listed in tool_ids. The position in the array becomes the tool’s order; tools belonging to the server but missing from the array are left untouched.
IDs in the array that don’t belong to the target server are silently dropped — only valid tool UUIDs scoped to the server are reordered. The endpoint always returns 200 if the server resolves; per-tool errors are not surfaced.
Path Parameters
string
required
The UUID of the server (e.g.
836995ae-1cff-41ec-823e-a4f07ccca3a0). Numeric IDs are also accepted for backwards compatibility.Body Parameters
array
required
Array of tool UUIDs in the desired order — index
0 becomes the first tool. UUIDs not belonging to the server are skipped.curl --request POST \
--url https://yoursite.com/wp-json/getmcp/v1/servers/836995ae-1cff-41ec-823e-a4f07ccca3a0/tools/reorder \
--header 'Authorization: Bearer gmcp_your_api_key' \
--header 'content-type: application/json' \
--data '{
"tool_ids": [
"5376af81-6bb8-4b01-800c-508d7672e394",
"e7a3c1d2-4f5b-6a7c-8d9e-0f1a2b3c4d5e",
"1a2b3c4d-5e6f-7081-92a3-b4c5d6e7f809"
]
}'
import requests
response = requests.post(
"https://yoursite.com/wp-json/getmcp/v1/servers/836995ae-1cff-41ec-823e-a4f07ccca3a0/tools/reorder",
headers={
"Authorization": "Bearer gmcp_your_api_key",
"Content-Type": "application/json",
},
json={
"tool_ids": [
"5376af81-6bb8-4b01-800c-508d7672e394",
"e7a3c1d2-4f5b-6a7c-8d9e-0f1a2b3c4d5e",
]
},
)
print(response.json())
const response = await fetch(
"https://yoursite.com/wp-json/getmcp/v1/servers/836995ae-1cff-41ec-823e-a4f07ccca3a0/tools/reorder",
{
method: "POST",
headers: {
"Authorization": "Bearer gmcp_your_api_key",
"Content-Type": "application/json",
},
body: JSON.stringify({
tool_ids: [
"5376af81-6bb8-4b01-800c-508d7672e394",
"e7a3c1d2-4f5b-6a7c-8d9e-0f1a2b3c4d5e",
],
}),
}
);
const data = await response.json();
$response = wp_remote_post(
"https://yoursite.com/wp-json/getmcp/v1/servers/836995ae-1cff-41ec-823e-a4f07ccca3a0/tools/reorder",
[
"headers" => [
"Authorization" => "Bearer gmcp_your_api_key",
"Content-Type" => "application/json",
],
"body" => wp_json_encode([
"tool_ids" => [
"5376af81-6bb8-4b01-800c-508d7672e394",
"e7a3c1d2-4f5b-6a7c-8d9e-0f1a2b3c4d5e",
],
]),
]
);
$data = json_decode( wp_remote_retrieve_body( $response ), true );
{
"reordered": true
}
{
"code": "getmcp_invalid_params",
"message": "tool_ids must be an array of tool UUIDs.",
"data": { "status": 400 }
}
{
"code": "getmcp_not_found",
"message": "Server not found.",
"data": { "status": 404 }
}
⌘I

