Skip to main content
Glama

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
NameRequiredDescriptionDefault
idNosecret id
managerNosecret manager type
secretNo

Implementation Reference

  • 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); });
  • 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, }));
  • 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);

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/api7/apisix-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server