Skip to main content
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."
  }
}
'
{
  "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:00",
  "updated_at": "2025-03-18T14: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
integer
required
The numeric ID of the server.
id
integer
required
The numeric ID of the resource to update.

Body Parameters

All fields are optional. Omitted fields are left unchanged.
uri
string
New URI for the resource. Any URI scheme is valid (e.g. docs://, file:///, custom schemes).
name
string
New display name.
description
string
New description.
mime_type
string
New MIME type (e.g. text/plain, text/markdown, application/json).
data_source_type
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.
data_source_config
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" }
template_uri
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."
  }
}
'
{
  "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:00",
  "updated_at": "2025-03-18T14:00:00"
}