APISIX-MCP

Official
by api7

update_service

Modify specific attributes of an existing service in APISIX-MCP, including description, hosts, plugins, and upstream configurations, using the service ID.

Instructions

Update specific attributes of an existing service

Input Schema

NameRequiredDescriptionDefault
idYesservice id
serviceYesservice configuration object

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "id": { "description": "service id", "type": "string" }, "service": { "additionalProperties": true, "description": "service configuration object", "properties": { "desc": { "description": "service description", "maxLength": 256, "type": "string" }, "enable_websocket": { "description": "enable websocket", "type": "boolean" }, "hosts": { "description": "allowed hosts", "items": { "type": "string" }, "type": "array" }, "labels": { "additionalProperties": { "type": "string" }, "description": "service labels", "type": "object" }, "name": { "description": "service name", "maxLength": 100, "minLength": 1, "type": "string" }, "plugins": { "additionalProperties": {}, "description": "plugins", "type": "object" }, "script": { "additionalProperties": {}, "description": "service script configuration", "type": "object" }, "upstream": { "additionalProperties": true, "description": "upstream service configuration object", "properties": { "checks": { "additionalProperties": false, "description": "health check configuration", "properties": { "active": { "additionalProperties": false, "description": "active health check configuration", "properties": { "healthy": { "additionalProperties": false, "properties": { "interval": { "description": "check interval for healthy status", "type": "number" }, "successes": { "description": "success count threshold", "type": "number" } }, "type": "object" }, "host": { "description": "host for health check", "type": "string" }, "http_path": { "description": "HTTP path for health check", "type": "string" }, "https_verify_certificate": { "description": "verify HTTPS certificate", "type": "boolean" }, "port": { "description": "port for health check", "type": "number" }, "timeout": { "description": "timeout for health check", "type": "number" }, "unhealthy": { "additionalProperties": false, "properties": { "http_failures": { "description": "HTTP failure count threshold", "type": "number" }, "interval": { "description": "check interval for unhealthy status", "type": "number" } }, "type": "object" } }, "type": "object" }, "passive": { "additionalProperties": false, "description": "passive health check configuration", "properties": { "healthy": { "additionalProperties": false, "properties": { "http_statuses": { "description": "HTTP status codes for healthy state", "items": { "type": "number" }, "type": "array" }, "successes": { "description": "success count threshold", "type": "number" } }, "type": "object" }, "unhealthy": { "additionalProperties": false, "properties": { "http_failures": { "description": "HTTP failure count threshold", "type": "number" }, "http_statuses": { "description": "HTTP status codes for unhealthy state", "items": { "type": "number" }, "type": "array" }, "timeout": { "description": "timeout threshold", "type": "number" } }, "type": "object" } }, "type": "object" } }, "type": "object" }, "desc": { "description": "upstream description", "maxLength": 256, "type": "string" }, "hash_on": { "description": "hash on type for chash algorithm", "enum": [ "vars", "header", "cookie", "consumer", "vars_combinations" ], "type": "string" }, "keepalive_pool": { "additionalProperties": false, "description": "keepalive pool configuration", "properties": { "idle_timeout": { "default": 60, "description": "idle timeout", "type": "number" }, "requests": { "default": 1000, "description": "requests", "type": "number" }, "size": { "default": 320, "description": "size", "type": "number" } }, "type": "object" }, "key": { "description": "hash key for chash algorithm", "type": "string" }, "labels": { "additionalProperties": { "type": "string" }, "description": "upstream labels", "type": "object" }, "name": { "description": "upstream name", "type": "string" }, "nodes": { "description": "upstream nodes with weights", "items": { "additionalProperties": false, "properties": { "host": { "description": "upstream host", "type": "string" }, "port": { "description": "upstream port", "type": "number" }, "priority": { "description": "upstream priority", "minimum": 0, "type": "number" }, "weight": { "description": "upstream weight", "minimum": 0, "type": "number" } }, "required": [ "host", "port" ], "type": "object" }, "type": "array" }, "pass_host": { "default": "pass", "description": "host passing mode", "enum": [ "pass", "node", "rewrite" ], "type": "string" }, "retries": { "description": "retry count", "minimum": 0, "type": "number" }, "retry_timeout": { "description": "retry timeout", "minimum": 0, "type": "number" }, "scheme": { "default": "http", "description": "upstream scheme", "enum": [ "http", "https", "grpc", "grpcs", "tcp", "tls", "udp", "kafka" ], "type": "string" }, "timeout": { "additionalProperties": false, "description": "timeout configuration", "properties": { "connect": { "description": "connection timeout in seconds", "type": "number" }, "read": { "description": "read timeout in seconds", "type": "number" }, "send": { "description": "send timeout in seconds", "type": "number" } }, "type": "object" }, "tls": { "additionalProperties": false, "description": "TLS configuration", "properties": { "client_cert": { "description": "TLS certificate", "type": "string" }, "client_cert_id": { "description": "TLS certificate id", "items": { "type": "string" }, "type": "array" }, "client_key": { "description": "TLS key", "type": "string" }, "verify": { "description": "TLS verification", "type": "boolean" } }, "type": "object" }, "type": { "default": "roundrobin", "description": "load balancing algorithm", "enum": [ "roundrobin", "chash", "ewma", "least_conn" ], "type": "string" }, "upstream_host": { "description": "upstream host for rewrite mode", "type": "string" } }, "type": "object" }, "upstream_id": { "description": "upstream id", "type": "string" }, "vars": { "description": "service match variables", "items": { "type": "array" }, "type": "array" } }, "type": "object" } }, "required": [ "id", "service" ], "type": "object" }
ID: s62o271u37