Skip to main content
Glama

create_secret

Generate secure secrets for APISIX-MCP by specifying a manager (Vault, AWS, or GCP) and providing required credentials, ensuring secure integration with supported platforms.

Instructions

Create a secret

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNosecret id
managerYessecret manager type
secretYes

Implementation Reference

  • Registers the "create_secret" tool and provides its handler function, which conditionally creates (POST) or updates (PUT) a secret via admin API based on whether an ID is provided.
    server.tool("create_secret", "Create a secret", CreateSecretSchema.shape, async (args) => {
      const secretId = args.id;
    
      if (secretId) {
        return await makeAdminAPIRequest(`/secrets/${args.manager}/${secretId}`, "PUT", args.secret);
      } else {
        return await makeAdminAPIRequest(`/secrets/${args.manager}`, "POST", args.secret);
      }
    });
  • Defines the Zod input schema for the create_secret tool, including optional secret ID, manager type, and secret configuration.
    export const CreateSecretSchema = z.object({
      id: z.string().optional().describe("secret id"),
      manager: SecretTypeSchema.describe("secret manager type"),
      secret: SecretSchema,
    });
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure but fails completely. 'Create a secret' doesn't indicate whether this is a read-only or destructive operation, what permissions are required, whether it's idempotent, what happens on failure, or what the tool returns. For a security-sensitive operation involving secret creation across multiple cloud providers, this is dangerously inadequate.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise at just two words, but this is under-specification rather than effective brevity. While it's front-loaded with the core action, it lacks any supporting information that would make it useful. The structure is minimal but fails to convey necessary information about this complex tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

This is completely inadequate for a tool with such complexity. With no annotations, no output schema, and a description that's just two words, the agent has almost no guidance. The tool handles secret creation across multiple cloud providers with complex authentication requirements, but the description provides none of this context. The schema does heavy lifting, but the description fails to complement it meaningfully.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description provides zero information about parameters, while the schema has 67% description coverage. The schema documents three parameters (id, manager, secret) with detailed sub-properties for different secret manager types, but the description doesn't mention any of them. For a tool with such complex nested parameters (vault, AWS, GCP configurations), the description should at least indicate what managers are supported or what the 'secret' parameter contains.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose2/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Create a secret' is a tautology that merely restates the tool name without adding any meaningful context. It doesn't specify what kind of secret is being created, what system it's created in, or how it differs from sibling tools like 'update_secret' or 'delete_secret'. While the verb 'create' is clear, the resource 'secret' is too vague without additional qualification.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides absolutely no guidance on when to use this tool versus alternatives. There's no mention of prerequisites, when this should be used instead of 'update_secret', what happens if a secret already exists, or any context about the secret management system. Given the complex parameter structure with multiple secret manager types, this lack of guidance is particularly problematic.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Related Tools

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