curl --request PATCH \
--url https://yoursite.com/wp-json/getmcp/v1/servers/1/resources/3 \
--header 'Authorization: Bearer gmcp_your_api_key' \
--header 'content-type: application/json' \
--data '
{
"data_source_type": "static",
"data_source_config": {
"content": "# Updated Guide\n\nThis guide covers all available weather tools."
}
}
'
import requests
response = requests.patch(
"https://yoursite.com/wp-json/getmcp/v1/servers/1/resources/3",
headers={
"Authorization": "Bearer gmcp_your_api_key",
"Content-Type": "application/json"
},
json={
"data_source_type": "static",
"data_source_config": {
"content": "# Updated Guide\n\nThis guide covers all available weather tools."
}
}
)
print(response.json())
const response = await fetch(
"https://yoursite.com/wp-json/getmcp/v1/servers/1/resources/3",
{
method: "PATCH",
headers: {
"Authorization": "Bearer gmcp_your_api_key",
"Content-Type": "application/json"
},
body: JSON.stringify({
data_source_type: "static",
data_source_config: {
content: "# Updated Guide\n\nThis guide covers all available weather tools."
}
})
}
);
const data = await response.json();
$response = wp_remote_request(
"https://yoursite.com/wp-json/getmcp/v1/servers/1/resources/3",
[
"method" => "PATCH",
"headers" => [
"Authorization" => "Bearer gmcp_your_api_key",
"Content-Type" => "application/json"
],
"body" => json_encode([
"data_source_type" => "static",
"data_source_config" => [
"content" => "# Updated Guide\n\nThis guide covers all available weather tools."
]
])
]
);
$data = json_decode(wp_remote_retrieve_body($response), true);
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
body := strings.NewReader(`{
"data_source_type": "static",
"data_source_config": {
"content": "# Updated Guide\n\nThis guide covers all available weather tools."
}
}`)
req, _ := http.NewRequest("PATCH", "https://yoursite.com/wp-json/getmcp/v1/servers/1/resources/3", 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 \"data_source_type\": \"static\",\n \"data_source_config\": {\n \"content\": \"# Updated Guide\\n\\nThis guide covers all available weather tools.\"\n }\n}";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://yoursite.com/wp-json/getmcp/v1/servers/1/resources/3"))
.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/resources/3')
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 = '{
"data_source_type": "static",
"data_source_config": {
"content": "# Updated Guide\n\nThis guide covers all available weather tools."
}
}'
response = http.request(request)
puts JSON.parse(response.body)
{
"id": 3,
"server_id": 1,
"uri": "docs://tool-guide",
"name": "Tool Usage Guide",
"description": "Updated guide for all weather tools",
"mime_type": "text/markdown",
"data_source_type": "static",
"data_source_config": {
"content": "# Updated Guide\n\nThis guide covers all available weather tools."
},
"template_uri": null,
"server_uuid": "836995ae-1cff-41ec-823e-a4f07ccca3a0",
"created_at": "2025-03-18T10:00:00Z",
"updated_at": "2025-03-18T14:00:00Z"
}
{
"code": "getmcp_not_found",
"message": "Resource not found.",
"data": { "status": 404 }
}
Resources
Update Resource
Partially update an existing resource. Only fields included in the request body are changed.
PATCH
/
wp-json
/
getmcp
/
v1
/
servers
/
{server_id}
/
resources
/
{id}
curl --request PATCH \
--url https://yoursite.com/wp-json/getmcp/v1/servers/1/resources/3 \
--header 'Authorization: Bearer gmcp_your_api_key' \
--header 'content-type: application/json' \
--data '
{
"data_source_type": "static",
"data_source_config": {
"content": "# Updated Guide\n\nThis guide covers all available weather tools."
}
}
'
import requests
response = requests.patch(
"https://yoursite.com/wp-json/getmcp/v1/servers/1/resources/3",
headers={
"Authorization": "Bearer gmcp_your_api_key",
"Content-Type": "application/json"
},
json={
"data_source_type": "static",
"data_source_config": {
"content": "# Updated Guide\n\nThis guide covers all available weather tools."
}
}
)
print(response.json())
const response = await fetch(
"https://yoursite.com/wp-json/getmcp/v1/servers/1/resources/3",
{
method: "PATCH",
headers: {
"Authorization": "Bearer gmcp_your_api_key",
"Content-Type": "application/json"
},
body: JSON.stringify({
data_source_type: "static",
data_source_config: {
content: "# Updated Guide\n\nThis guide covers all available weather tools."
}
})
}
);
const data = await response.json();
$response = wp_remote_request(
"https://yoursite.com/wp-json/getmcp/v1/servers/1/resources/3",
[
"method" => "PATCH",
"headers" => [
"Authorization" => "Bearer gmcp_your_api_key",
"Content-Type" => "application/json"
],
"body" => json_encode([
"data_source_type" => "static",
"data_source_config" => [
"content" => "# Updated Guide\n\nThis guide covers all available weather tools."
]
])
]
);
$data = json_decode(wp_remote_retrieve_body($response), true);
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
body := strings.NewReader(`{
"data_source_type": "static",
"data_source_config": {
"content": "# Updated Guide\n\nThis guide covers all available weather tools."
}
}`)
req, _ := http.NewRequest("PATCH", "https://yoursite.com/wp-json/getmcp/v1/servers/1/resources/3", 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 \"data_source_type\": \"static\",\n \"data_source_config\": {\n \"content\": \"# Updated Guide\\n\\nThis guide covers all available weather tools.\"\n }\n}";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://yoursite.com/wp-json/getmcp/v1/servers/1/resources/3"))
.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/resources/3')
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 = '{
"data_source_type": "static",
"data_source_config": {
"content": "# Updated Guide\n\nThis guide covers all available weather tools."
}
}'
response = http.request(request)
puts JSON.parse(response.body)
{
"id": 3,
"server_id": 1,
"uri": "docs://tool-guide",
"name": "Tool Usage Guide",
"description": "Updated guide for all weather tools",
"mime_type": "text/markdown",
"data_source_type": "static",
"data_source_config": {
"content": "# Updated Guide\n\nThis guide covers all available weather tools."
},
"template_uri": null,
"server_uuid": "836995ae-1cff-41ec-823e-a4f07ccca3a0",
"created_at": "2025-03-18T10:00:00Z",
"updated_at": "2025-03-18T14:00:00Z"
}
{
"code": "getmcp_not_found",
"message": "Resource not found.",
"data": { "status": 404 }
}
Path Parameters
string
required
The numeric ID of the server.
string
required
The numeric ID of the resource to update.
Body Parameters
All fields are optional. Omitted fields are left unchanged.string
New URI for the resource. Any URI scheme is valid (e.g.
docs://, file:///, custom schemes).string
New display name.
string
New description.
string
New MIME type (e.g.
text/plain, text/markdown, application/json).string
New data source type. One of:
static, url, wp_query, callback.
When changing this, always send an updated data_source_config matching the new type.object
New configuration for the data source. Send as a JSON object. Shape depends on
data_source_type:static{ "content": "Your static content here." }
url{ "url": "https://api.example.com/data.json", "cache_ttl": 300 }
wp_query{ "post_type": "post", "posts_per_page": 10, "orderby": "date", "order": "DESC" }
callback{ "callback": "my_plugin_resource_callback" }
string
New URI template for parameterized resources (e.g.
file:///data/{id}.json).curl --request PATCH \
--url https://yoursite.com/wp-json/getmcp/v1/servers/1/resources/3 \
--header 'Authorization: Bearer gmcp_your_api_key' \
--header 'content-type: application/json' \
--data '
{
"data_source_type": "static",
"data_source_config": {
"content": "# Updated Guide\n\nThis guide covers all available weather tools."
}
}
'
import requests
response = requests.patch(
"https://yoursite.com/wp-json/getmcp/v1/servers/1/resources/3",
headers={
"Authorization": "Bearer gmcp_your_api_key",
"Content-Type": "application/json"
},
json={
"data_source_type": "static",
"data_source_config": {
"content": "# Updated Guide\n\nThis guide covers all available weather tools."
}
}
)
print(response.json())
const response = await fetch(
"https://yoursite.com/wp-json/getmcp/v1/servers/1/resources/3",
{
method: "PATCH",
headers: {
"Authorization": "Bearer gmcp_your_api_key",
"Content-Type": "application/json"
},
body: JSON.stringify({
data_source_type: "static",
data_source_config: {
content: "# Updated Guide\n\nThis guide covers all available weather tools."
}
})
}
);
const data = await response.json();
$response = wp_remote_request(
"https://yoursite.com/wp-json/getmcp/v1/servers/1/resources/3",
[
"method" => "PATCH",
"headers" => [
"Authorization" => "Bearer gmcp_your_api_key",
"Content-Type" => "application/json"
],
"body" => json_encode([
"data_source_type" => "static",
"data_source_config" => [
"content" => "# Updated Guide\n\nThis guide covers all available weather tools."
]
])
]
);
$data = json_decode(wp_remote_retrieve_body($response), true);
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
body := strings.NewReader(`{
"data_source_type": "static",
"data_source_config": {
"content": "# Updated Guide\n\nThis guide covers all available weather tools."
}
}`)
req, _ := http.NewRequest("PATCH", "https://yoursite.com/wp-json/getmcp/v1/servers/1/resources/3", 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 \"data_source_type\": \"static\",\n \"data_source_config\": {\n \"content\": \"# Updated Guide\\n\\nThis guide covers all available weather tools.\"\n }\n}";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://yoursite.com/wp-json/getmcp/v1/servers/1/resources/3"))
.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/resources/3')
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 = '{
"data_source_type": "static",
"data_source_config": {
"content": "# Updated Guide\n\nThis guide covers all available weather tools."
}
}'
response = http.request(request)
puts JSON.parse(response.body)
{
"id": 3,
"server_id": 1,
"uri": "docs://tool-guide",
"name": "Tool Usage Guide",
"description": "Updated guide for all weather tools",
"mime_type": "text/markdown",
"data_source_type": "static",
"data_source_config": {
"content": "# Updated Guide\n\nThis guide covers all available weather tools."
},
"template_uri": null,
"server_uuid": "836995ae-1cff-41ec-823e-a4f07ccca3a0",
"created_at": "2025-03-18T10:00:00Z",
"updated_at": "2025-03-18T14:00:00Z"
}
{
"code": "getmcp_not_found",
"message": "Resource not found.",
"data": { "status": 404 }
}
⌘I

