Skip to main content
Glama

manage_modal_secret

Destructive

Create or delete Modal secrets, optionally loading values from .env or JSON files and overwriting existing secrets; returned outputs redact values to prevent leaks.

Instructions

Create or delete a secret. To list secret names use
list_modal_resources(resource="secrets") — values are never readable.

Values are redacted from every field returned (command, stdout, stderr, error), so
they cannot leak back into the transcript on failure.

Args:
    action: "create" or "delete".
    secret_name: Secret name.
    key_values: For "create": {"API_KEY": "abc", ...}.
    from_dotenv / from_json: For "create": load key/values from a local file instead.
        Subject to MCP_MODAL_ALLOWED_LOCAL_PATHS when it is set.
    force: For "create": overwrite an existing secret.
    env: Modal environment to target.
    profile: Modal profile for this call only. Defaults to the active profile.

Returns: {message, stdout, stderr} or {error}, with values redacted.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "action": "<action>",
      "secret_name": "<secret_name>"
    },
    "name": "manage_modal_secret"
  }
}

Input Schema

NameRequiredDescriptionDefault
envNo
forceNo
actionYes
profileNo
from_jsonNo
key_valuesNo
from_dotenvNo
secret_nameYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.0.1
    • addedInput schema / properties / profile
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Profile"
      +}
  2. Addedv0.2.2

TDQS

A4.3/5.0
Behavior5/5

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

Annotations already declare destructive=true and readOnly=false, and the description goes well beyond that: values are redacted from every returned field (command, stdout, stderr, error) so they cannot leak into the transcript, and from_dotenv/from_json are subject to MCP_MODAL_ALLOWED_LOCAL_PATHS. It also notes force overwrites an existing secret and that profile applies to this call only, which are meaningful operational details not in the annotations.

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

Conciseness5/5

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

Front-loaded with purpose, then the naming alternative, then the redaction guarantee, then a scannable Args block and a one-line Returns. Every sentence adds information the caller needs given a 0%-coverage schema; there is no filler.

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

Completeness4/5

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

For a destructive two-action tool it covers the essentials: mutation semantics, redaction of returned data, local-file path restrictions, and overwrite behavior. Minor gaps remain, such as required permissions, behavior when deleting a non-existent secret, and why the operation is non-idempotent per annotations, though the presence of an output schema removes the need to fully specify the return shape.

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

Parameters4/5

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

Schema description coverage is 0% with 8 parameters, so the description carries the full burden and it does document every parameter's role, including the create-only conditions on key_values, from_dotenv/from_json, and force. It does not state whether key_values and the file-based loaders are mutually exclusive or which wins if both are supplied, leaving a real ambiguity for callers.

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

Purpose4/5

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

States a specific verb pair and resource ('Create or delete a secret') and immediately routes listing to the sibling list_modal_resources. It also clarifies the read boundary ('values are never readable'), which implicitly separates it from inspect_modal_secret. It does not explicitly contrast with inspect_modal_secret, so sibling differentiation is good but not complete.

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

Usage Guidelines4/5

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

Explicitly tells the agent where to go for the listing use case (list_modal_resources(resource="secrets")), which is the most likely confusion point for a tool named manage_modal_secret. It gives no guidance on when to prefer create vs delete beyond the action enum, and no exclusions such as prerequisites or when a failure should be retried.

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