Skip to main content
Version: 0.13.0

Update MCP tools

Introduced 0.7.0

Updates Model Context Protocol (MCP) tools already registered with the Lucenia MCP server.

One request updates one or more tools, and the update is applied on every node in the cluster. The response reports the outcome per node.

Request

POST /_plugins/_agent/mcp/tools/_update
info

POST /_plugins/_ml/mcp/tools/_update still works but is deprecated and emits a deprecation warning. Prefer the /_plugins/_agent path.

Request body

The body is an object with a tools array. Each entry identifies the tool by name and carries the fields to update.

POST /_plugins/_agent/mcp/tools/_update
{
"tools": [
{
"name": "WeatherTool",
"description": "Returns the current forecast for a location",
"parameters": {
"location": "string"
},
"attributes": {
"input_schema": {
"type": "object",
"properties": {
"location": { "type": "string" }
},
"required": ["location"]
}
}
}
]
}
FieldTypeRequired/OptionalDescription
nameStringRequiredThe registered tool name. Identifies which tool to update — a request without it is rejected with name field required.
descriptionStringOptionalReplaces the tool's description.
parametersObjectOptionalReplaces the tool's parameters.
attributesObjectOptionalReplaces the tool's attributes, such as input_schema.

An empty or absent tools array is rejected with tools list can not be null.

Example request

curl -X POST "https://localhost:9200/_plugins/_agent/mcp/tools/_update" \
-H "Content-Type: application/json" \
-H "Authorization: Basic $(echo -n 'username:password' | base64)" \
-d '{
"tools": [
{
"name": "WeatherTool",
"description": "Returns the current forecast for a location"
}
]
}'

Example response

The response is an object keyed by node ID:

{
"bO_Y2E7tRSSVAgcqEDvJTQ": {
"updated": true
},
"kY9pQ2FnQ0aVzE4xLmT1Wg": {
"updated": true
}
}

A node that could not apply the update reports the reason under its own key:

{
"bO_Y2E7tRSSVAgcqEDvJTQ": {
"updated": true
},
"kY9pQ2FnQ0aVzE4xLmT1Wg": {
"error": "tool [WeatherTool] not found"
}
}

A per-node failure does not fail the whole request, so check every key before treating an update as applied everywhere.

Updating several tools

There is no separate batch endpoint. tools is already a list — name every tool you want to update in a single request.