update_secret
Modify specific attributes of an existing secret, including ID, manager type (Vault, AWS, GCP), and configuration details, within the APISIX-MCP server.
Instructions
Update specific attributes of an existing secret
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | secret id | |
| manager | No | secret manager type | |
| secret | No |
Implementation Reference
- src/tools/secret.ts:26-28 (handler)Inline async handler for the 'update_secret' MCP tool. It performs a PATCH request to the Admin API endpoint `/secrets/{manager}/{id}` with the provided secret data.server.tool("update_secret", "Update specific attributes of an existing secret", UpdateSecretSchema.shape, async (args) => { return await makeAdminAPIRequest(`/secrets/${args.manager}/${args.id}`, "PATCH", args.secret); });
- src/schemas/secret.ts:59-63 (schema)Zod schema defining the input structure for the 'update_secret' tool, including id, manager type, and secret object. Uses createNullablePatchSchema for partial updates.export const UpdateSecretSchema = createNullablePatchSchema(z.object({ id: z.string().describe("secret id"), manager: SecretTypeSchema.describe("secret manager type"), secret: SecretSchema, }));
- src/tools/secret.ts:26-28 (registration)Registers the 'update_secret' tool on the MCP server with description, schema, and inline handler.server.tool("update_secret", "Update specific attributes of an existing secret", UpdateSecretSchema.shape, async (args) => { return await makeAdminAPIRequest(`/secrets/${args.manager}/${args.id}`, "PATCH", args.secret); });
- src/index.ts:32-32 (registration)Top-level registration of secret tools (including 'update_secret') by calling the setup function on the MCP server instance.setupSecretTools(server);