Skip to main content
Glama

create_modal_secret

Create a Modal secret with key/value pairs provided inline or loaded from a .env or JSON file. Supports overwriting existing secrets with the force option.

Instructions

Create a Modal secret (`modal secret create`). Provide the key/value pairs inline,
or load them from a local .env or JSON file. Secret values are redacted from the
returned `command` field.

Args:
    secret_name: Name for the secret.
    key_values: Mapping of secret keys to values, e.g. {"API_KEY": "abc", "DB_URL": "..."}.
    from_dotenv: Path to a local .env file to load key/values from (`--from-dotenv`).
    from_json: Path to a local JSON file to load key/values from (`--from-json`).
    force: If True, overwrite the secret if it already exists (`--force`).
    env: Optional Modal environment to create the secret in.

Returns:
    A dictionary containing the result of the create operation, with values redacted.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
secret_nameYes
key_valuesNo
from_dotenvNo
from_jsonNo
forceNo
envNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/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. It reveals that secret values are redacted from the returned 'command' field and that force overwrites existing secrets. However, it does not discuss idempotency, authorization requirements, or consequences of non-force creation when secret exists.

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 well-structured with Args and Returns sections. Each sentence adds value, but it is slightly lengthy. It could be more concise without losing clarity, but it remains readable and informative.

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

Completeness5/5

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

Given the tool has 6 parameters (1 required) and an output schema hinted in the description (returns dictionary with redacted values), the description covers all aspects: creation methods, parameter explanations, return format, and redaction behavior. No gaps remain for a typical creation tool.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must compensate. It lists all 6 parameters with clear explanations: secret_name (required), key_values (mapping), from_dotenv/from_json (file paths), force (overwrite flag), env (optional environment). This adds significant meaning beyond the schema's minimal type/required info.

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 it creates a Modal secret, specifies multiple input methods (inline, .env, JSON), and distinguishes from sibling tools like list_modal_secrets and delete_modal_secret. The verb 'create' and resource 'secret' are explicit.

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?

The description explains how to provide key-value pairs via three methods (inline, .env, JSON) and mentions the --force flag for overwriting. It does not explicitly state when not to use this tool, but usage context is clear. No alternatives or exclusions are given.

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/george-bobby/mcp-modal'

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