Skip to main content
Glama
keywaysh

Keyway MCP Server

by keywaysh

keyway_set_secret

Create or update secrets in a secure vault using uppercase naming conventions like DATABASE_URL for credential management.

Instructions

Create or update a secret in the Keyway vault. The key must be uppercase with underscores (e.g., DATABASE_URL).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesSecret name - must be uppercase with underscores
valueYesSecret value to store
environmentNoEnvironment to set secret in (default: "development")

Implementation Reference

  • The handler function `setSecret` that processes the `keyway_set_secret` tool, including validation and interaction with the API.
    export async function setSecret(args: {
      name: string;
      value: string;
      environment?: string;
    }): Promise<CallToolResult> {
      // Validate name format
      if (!SECRET_NAME_PATTERN.test(args.name)) {
        return {
          content: [
            {
              type: 'text',
              text: `Invalid secret name "${args.name}". Name must be uppercase with underscores (e.g., DATABASE_URL, API_KEY)`,
            },
          ],
          isError: true,
        };
      }
    
      const token = await getToken();
      const repository = getRepository();
      const environment = args.environment || 'development';
    
      const result = await pushSecrets(repository, environment, { [args.name]: args.value }, token);
    
      const action = result.stats?.created ? 'created' : 'updated';
    
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify({ success: true, name: args.name, environment, action }, null, 2),
          },
        ],
      };
    }
  • src/index.ts:36-48 (registration)
    Registration of the `keyway_set_secret` tool in the MCP server, defining its schema and mapping it to the `setSecret` handler.
    server.tool(
      'keyway_set_secret',
      'Create or update a secret in the Keyway vault. The key must be uppercase with underscores (e.g., DATABASE_URL).',
      {
        name: z.string().describe('Secret name - must be uppercase with underscores'),
        value: z.string().describe('Secret value to store'),
        environment: z
          .string()
          .optional()
          .describe('Environment to set secret in (default: "development")'),
      },
      async (args) => setSecret(args)
    );
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions the key format constraint, which is useful, but does not cover critical aspects like authentication requirements, rate limits, whether the operation is idempotent, or what happens on success/failure. For a mutation tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

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

Conciseness4/5

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

The description is a single, efficient sentence that front-loads the core action and includes a helpful example for the key format. It avoids unnecessary words, though it could be slightly more structured by separating key constraints from the main action for clarity.

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

Completeness2/5

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

Given the tool's complexity (a mutation operation with no annotations and no output schema), the description is insufficient. It lacks details on return values, error handling, permissions, or side effects, which are crucial for an agent to use this tool correctly. The description does not compensate for the absence of structured behavioral data.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents all three parameters (name, value, environment) with descriptions. The description adds minimal value by reinforcing the key format for 'name' but does not provide additional syntax, examples beyond the basic one, or context for parameter interactions. Baseline 3 is appropriate as the schema handles most of the parameter documentation.

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

Purpose5/5

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

The description clearly states the action ('Create or update') and resource ('a secret in the Keyway vault'), distinguishing it from sibling tools like keyway_list_secrets or keyway_validate. It specifies the exact operation with the key format constraint, making the purpose unambiguous.

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

Usage Guidelines3/5

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

The description implies usage for setting secrets in a vault, but does not explicitly state when to use this tool versus alternatives like keyway_list_secrets or keyway_validate. It provides some context (e.g., key format) but lacks guidance on prerequisites, exclusions, or specific scenarios for choosing this tool over others.

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

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/keywaysh/keyway-mcp'

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