Skip to main content
Glama
DelineaMCP

DelineaMCP

Official
by DelineaXPM

Export Secret to Environment Variables

get_secret_environment_variable
Idempotent

Load a secret's username and password into shell environment variables for bash, PowerShell, or cmd so credentials are used without exposing their values.

Instructions

Load a secret's username and password into shell environment variables.

This is the preferred way to use a credential: the value never appears in the conversation. When the server runs locally (stdio), it reads the secret itself and writes a private, self-deleting file of shell assignments, returning only the file's path; nothing else needs to be installed. Over HTTP transports it returns a script instead, which calls the Secret Server REST API with the server's short-lived access token (bash needs curl and jq; powershell needs nothing extra).

Before retrieving a secret, check whether it requires approval:

  1. Call get_secret(id, summary=True) and inspect requiresApproval and requiresComment.

  2. If approval is required, call get_pending_access_requests() to check for an existing grant, or request access and wait for approval via handle_access_request().

  3. Always provide the comment parameter explaining why this secret is being accessed. If the action is tied to a ticket, incident, or change request, that reference must be named in the comment.

Parameters

secret_id: Identifier of the secret to retrieve. environment: Target shell environment. Supported values are "bash", "powershell" and "cmd". comment: Required when the secret has requiresComment or requiresApproval set. Must explain why this secret is being accessed and, if the action is tied to a formal request (e.g. a Jira ticket, incident, or change request), that reference must be included.

Returns

dict script_path plus a run hint (local mode). Running it exports SECRET_USERNAME_<id> and SECRET_PASSWORD_<id>. str The script text (HTTP transports). dict Error information if the secret requires approval or a comment that was not provided.

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": {
      "secret_id": "<secret_id>",
      "environment": "<environment>"
    },
    "name": "get_secret_environment_variable"
  }
}

Input Schema

NameRequiredDescriptionDefault
commentNo
secret_idYes
environmentYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.0.0

TDQS

A4.5/5.0
Behavior5/5

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

Annotations declare readOnlyHint=false and idempotentHint=true; the description explains exactly why non-read-only behavior occurs — it writes a private, self-deleting file of shell assignments locally, or returns a script over HTTP that calls the REST API with a short-lived token. It also discloses external dependencies (bash needs curl and jq, powershell needs nothing extra) and the approval/comment gating. This is substantial context beyond what the annotations convey.

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?

Front-loaded with purpose and the local-vs-HTTP behavior distinction, then an ordered approval workflow, then parameter docs — a logical progression. Minor waste: the comment parameter's requirement is stated twice (step 3 and the Parameters section), and the Returns section partly repeats information already carried by the output schema.

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

Completeness3/5

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

For the calling decision it is complete — transport-dependent behavior, approval gating, parameter constraints, and error conditions (dict with error info when approval or comment missing) are all covered. However, it omits a key detail: what identifiers the exported variables actually carry is stated (SECRET_USERNAME_<id>) but nothing about secret ID format or what happens if the secret is inaccessible, and the Returns section overlaps an output schema that already documents return values.

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 coverage is 0%, so the description carries the full burden and does so: secret_id is the identifier to retrieve, environment accepts 'bash', 'powershell' and 'cmd' (an enum not present in the schema, which has zero enums), and comment is required when requiresComment or requiresApproval is set and must explain why, including any ticket/incident/change reference. Every parameter gains meaning the schema lacks.

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?

States a specific verb and resource ('Load a secret's username and password into shell environment variables') and immediately distinguishes itself from retrieval siblings by framing this as 'the preferred way to *use* a credential: the value never appears in the conversation.' An agent can tell this apart from get_secret without opening either schema.

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?

Gives explicit preconditions and an ordered workflow: call get_secret(id, summary=True) to inspect requiresApproval/requiresComment, then get_pending_access_requests() or handle_access_request() when approval is needed. It also names the alternative pattern (retrieving the value directly) implicitly by calling this the preferred approach, though the 'when not to use' case is only implied rather than stated outright.

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