curl --request PATCH \
--url https://yoursite.com/wp-json/getmcp/v1/servers/1/prompts/2 \
--header 'Authorization: Bearer gmcp_your_api_key' \
--header 'content-type: application/json' \
--data '
{
"description": "Summarize articles with configurable length and format",
"template_content": "Please summarize the following article.\n\nStyle: {{style}}\nMax words: {{max_words}}\n\nArticle:\n{{article_text}}"
}
'
import requests
response = requests.patch(
"https://yoursite.com/wp-json/getmcp/v1/servers/1/prompts/2",
headers={
"Authorization": "Bearer gmcp_your_api_key",
"Content-Type": "application/json"
},
json={
"description": "Summarize articles with configurable length and format",
"template_content": "Please summarize the following article.\n\nStyle: {{style}}\nMax words: {{max_words}}\n\nArticle:\n{{article_text}}"
}
)
print(response.json())
const response = await fetch(
"https://yoursite.com/wp-json/getmcp/v1/servers/1/prompts/2",
{
method: "PATCH",
headers: {
"Authorization": "Bearer gmcp_your_api_key",
"Content-Type": "application/json"
},
body: JSON.stringify({
description: "Summarize articles with configurable length and format",
template_content: "Please summarize the following article.\n\nStyle: {{style}}\nMax words: {{max_words}}\n\nArticle:\n{{article_text}}"
})
}
);
const data = await response.json();
$response = wp_remote_request(
"https://yoursite.com/wp-json/getmcp/v1/servers/1/prompts/2",
[
"method" => "PATCH",
"headers" => [
"Authorization" => "Bearer gmcp_your_api_key",
"Content-Type" => "application/json"
],
"body" => json_encode([
"description" => "Summarize articles with configurable length and format",
"template_content" => "Please summarize the following article.\n\nStyle: {{style}}\nMax words: {{max_words}}\n\nArticle:\n{{article_text}}"
])
]
);
$data = json_decode(wp_remote_retrieve_body($response), true);
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
body := strings.NewReader(`{
"description": "Summarize articles with configurable length and format",
"template_content": "Please summarize the following article.\n\nStyle: {{style}}\nMax words: {{max_words}}\n\nArticle:\n{{article_text}}"
}`)
req, _ := http.NewRequest("PATCH", "https://yoursite.com/wp-json/getmcp/v1/servers/1/prompts/2", body)
req.Header.Set("Authorization", "Bearer gmcp_your_api_key")
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
data, _ := io.ReadAll(resp.Body)
fmt.Println(string(data))
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
String json = "{\n \"description\": \"Summarize articles with configurable length and format\",\n \"template_content\": \"Please summarize the following article.\\n\\nStyle: {{style}}\\nMax words: {{max_words}}\\n\\nArticle:\\n{{article_text}}\"\n}";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://yoursite.com/wp-json/getmcp/v1/servers/1/prompts/2"))
.header("Authorization", "Bearer gmcp_your_api_key")
.header("Content-Type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString(json))
.build();
HttpClient client = HttpClient.newHttpClient();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}
require 'net/http'
require 'json'
require 'uri'
uri = URI('https://yoursite.com/wp-json/getmcp/v1/servers/1/prompts/2')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == 'https'
request = Net::HTTP::Patch.new(uri)
request['Authorization'] = 'Bearer gmcp_your_api_key'
request['Content-Type'] = 'application/json'
request.body = '{
"description": "Summarize articles with configurable length and format",
"template_content": "Please summarize the following article.\n\nStyle: {{style}}\nMax words: {{max_words}}\n\nArticle:\n{{article_text}}"
}'
response = http.request(request)
puts JSON.parse(response.body)
{
"id": 2,
"server_id": 1,
"name": "summarize_article",
"description": "Summarize articles with configurable length and format",
"arguments": [
{"name": "article_text", "description": "The full article text", "required": true},
{"name": "style", "description": "Summary style", "required": false},
{"name": "max_words", "description": "Maximum word count", "required": false}
],
"template_content": "Please summarize the following article.\n\nStyle: {{style}}\nMax words: {{max_words}}\n\nArticle:\n{{article_text}}",
"server_uuid": "836995ae-1cff-41ec-823e-a4f07ccca3a0",
"created_at": "2025-03-18T10:00:00Z",
"updated_at": "2025-03-18T15:00:00Z"
}
Prompts
Update Prompt
Partially update an existing prompt template.
PATCH
/
wp-json
/
getmcp
/
v1
/
servers
/
{server_id}
/
prompts
/
{id}
curl --request PATCH \
--url https://yoursite.com/wp-json/getmcp/v1/servers/1/prompts/2 \
--header 'Authorization: Bearer gmcp_your_api_key' \
--header 'content-type: application/json' \
--data '
{
"description": "Summarize articles with configurable length and format",
"template_content": "Please summarize the following article.\n\nStyle: {{style}}\nMax words: {{max_words}}\n\nArticle:\n{{article_text}}"
}
'
import requests
response = requests.patch(
"https://yoursite.com/wp-json/getmcp/v1/servers/1/prompts/2",
headers={
"Authorization": "Bearer gmcp_your_api_key",
"Content-Type": "application/json"
},
json={
"description": "Summarize articles with configurable length and format",
"template_content": "Please summarize the following article.\n\nStyle: {{style}}\nMax words: {{max_words}}\n\nArticle:\n{{article_text}}"
}
)
print(response.json())
const response = await fetch(
"https://yoursite.com/wp-json/getmcp/v1/servers/1/prompts/2",
{
method: "PATCH",
headers: {
"Authorization": "Bearer gmcp_your_api_key",
"Content-Type": "application/json"
},
body: JSON.stringify({
description: "Summarize articles with configurable length and format",
template_content: "Please summarize the following article.\n\nStyle: {{style}}\nMax words: {{max_words}}\n\nArticle:\n{{article_text}}"
})
}
);
const data = await response.json();
$response = wp_remote_request(
"https://yoursite.com/wp-json/getmcp/v1/servers/1/prompts/2",
[
"method" => "PATCH",
"headers" => [
"Authorization" => "Bearer gmcp_your_api_key",
"Content-Type" => "application/json"
],
"body" => json_encode([
"description" => "Summarize articles with configurable length and format",
"template_content" => "Please summarize the following article.\n\nStyle: {{style}}\nMax words: {{max_words}}\n\nArticle:\n{{article_text}}"
])
]
);
$data = json_decode(wp_remote_retrieve_body($response), true);
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
body := strings.NewReader(`{
"description": "Summarize articles with configurable length and format",
"template_content": "Please summarize the following article.\n\nStyle: {{style}}\nMax words: {{max_words}}\n\nArticle:\n{{article_text}}"
}`)
req, _ := http.NewRequest("PATCH", "https://yoursite.com/wp-json/getmcp/v1/servers/1/prompts/2", body)
req.Header.Set("Authorization", "Bearer gmcp_your_api_key")
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
data, _ := io.ReadAll(resp.Body)
fmt.Println(string(data))
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
String json = "{\n \"description\": \"Summarize articles with configurable length and format\",\n \"template_content\": \"Please summarize the following article.\\n\\nStyle: {{style}}\\nMax words: {{max_words}}\\n\\nArticle:\\n{{article_text}}\"\n}";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://yoursite.com/wp-json/getmcp/v1/servers/1/prompts/2"))
.header("Authorization", "Bearer gmcp_your_api_key")
.header("Content-Type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString(json))
.build();
HttpClient client = HttpClient.newHttpClient();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}
require 'net/http'
require 'json'
require 'uri'
uri = URI('https://yoursite.com/wp-json/getmcp/v1/servers/1/prompts/2')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == 'https'
request = Net::HTTP::Patch.new(uri)
request['Authorization'] = 'Bearer gmcp_your_api_key'
request['Content-Type'] = 'application/json'
request.body = '{
"description": "Summarize articles with configurable length and format",
"template_content": "Please summarize the following article.\n\nStyle: {{style}}\nMax words: {{max_words}}\n\nArticle:\n{{article_text}}"
}'
response = http.request(request)
puts JSON.parse(response.body)
{
"id": 2,
"server_id": 1,
"name": "summarize_article",
"description": "Summarize articles with configurable length and format",
"arguments": [
{"name": "article_text", "description": "The full article text", "required": true},
{"name": "style", "description": "Summary style", "required": false},
{"name": "max_words", "description": "Maximum word count", "required": false}
],
"template_content": "Please summarize the following article.\n\nStyle: {{style}}\nMax words: {{max_words}}\n\nArticle:\n{{article_text}}",
"server_uuid": "836995ae-1cff-41ec-823e-a4f07ccca3a0",
"created_at": "2025-03-18T10:00:00Z",
"updated_at": "2025-03-18T15:00:00Z"
}
Path Parameters
string
required
The numeric ID of the server.
string
required
The numeric ID of the prompt to update.
Body Parameters
All fields are optional.string
New prompt name.
string
New description.
array
Updated arguments array.
string
New template content.
curl --request PATCH \
--url https://yoursite.com/wp-json/getmcp/v1/servers/1/prompts/2 \
--header 'Authorization: Bearer gmcp_your_api_key' \
--header 'content-type: application/json' \
--data '
{
"description": "Summarize articles with configurable length and format",
"template_content": "Please summarize the following article.\n\nStyle: {{style}}\nMax words: {{max_words}}\n\nArticle:\n{{article_text}}"
}
'
import requests
response = requests.patch(
"https://yoursite.com/wp-json/getmcp/v1/servers/1/prompts/2",
headers={
"Authorization": "Bearer gmcp_your_api_key",
"Content-Type": "application/json"
},
json={
"description": "Summarize articles with configurable length and format",
"template_content": "Please summarize the following article.\n\nStyle: {{style}}\nMax words: {{max_words}}\n\nArticle:\n{{article_text}}"
}
)
print(response.json())
const response = await fetch(
"https://yoursite.com/wp-json/getmcp/v1/servers/1/prompts/2",
{
method: "PATCH",
headers: {
"Authorization": "Bearer gmcp_your_api_key",
"Content-Type": "application/json"
},
body: JSON.stringify({
description: "Summarize articles with configurable length and format",
template_content: "Please summarize the following article.\n\nStyle: {{style}}\nMax words: {{max_words}}\n\nArticle:\n{{article_text}}"
})
}
);
const data = await response.json();
$response = wp_remote_request(
"https://yoursite.com/wp-json/getmcp/v1/servers/1/prompts/2",
[
"method" => "PATCH",
"headers" => [
"Authorization" => "Bearer gmcp_your_api_key",
"Content-Type" => "application/json"
],
"body" => json_encode([
"description" => "Summarize articles with configurable length and format",
"template_content" => "Please summarize the following article.\n\nStyle: {{style}}\nMax words: {{max_words}}\n\nArticle:\n{{article_text}}"
])
]
);
$data = json_decode(wp_remote_retrieve_body($response), true);
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
body := strings.NewReader(`{
"description": "Summarize articles with configurable length and format",
"template_content": "Please summarize the following article.\n\nStyle: {{style}}\nMax words: {{max_words}}\n\nArticle:\n{{article_text}}"
}`)
req, _ := http.NewRequest("PATCH", "https://yoursite.com/wp-json/getmcp/v1/servers/1/prompts/2", body)
req.Header.Set("Authorization", "Bearer gmcp_your_api_key")
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
data, _ := io.ReadAll(resp.Body)
fmt.Println(string(data))
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
String json = "{\n \"description\": \"Summarize articles with configurable length and format\",\n \"template_content\": \"Please summarize the following article.\\n\\nStyle: {{style}}\\nMax words: {{max_words}}\\n\\nArticle:\\n{{article_text}}\"\n}";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://yoursite.com/wp-json/getmcp/v1/servers/1/prompts/2"))
.header("Authorization", "Bearer gmcp_your_api_key")
.header("Content-Type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString(json))
.build();
HttpClient client = HttpClient.newHttpClient();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}
require 'net/http'
require 'json'
require 'uri'
uri = URI('https://yoursite.com/wp-json/getmcp/v1/servers/1/prompts/2')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == 'https'
request = Net::HTTP::Patch.new(uri)
request['Authorization'] = 'Bearer gmcp_your_api_key'
request['Content-Type'] = 'application/json'
request.body = '{
"description": "Summarize articles with configurable length and format",
"template_content": "Please summarize the following article.\n\nStyle: {{style}}\nMax words: {{max_words}}\n\nArticle:\n{{article_text}}"
}'
response = http.request(request)
puts JSON.parse(response.body)
{
"id": 2,
"server_id": 1,
"name": "summarize_article",
"description": "Summarize articles with configurable length and format",
"arguments": [
{"name": "article_text", "description": "The full article text", "required": true},
{"name": "style", "description": "Summary style", "required": false},
{"name": "max_words", "description": "Maximum word count", "required": false}
],
"template_content": "Please summarize the following article.\n\nStyle: {{style}}\nMax words: {{max_words}}\n\nArticle:\n{{article_text}}",
"server_uuid": "836995ae-1cff-41ec-823e-a4f07ccca3a0",
"created_at": "2025-03-18T10:00:00Z",
"updated_at": "2025-03-18T15:00:00Z"
}
⌘I

