Skip to main content
Glama
DelineaMCP

DelineaMCP

Official
by DelineaXPM

Set Secret Field from Local Value

set_secret_field_environment_variable
Idempotent

Stores a value from your machine into a Delinea secret field without exposing it to the model, for external credentials such as AWS API keys or tokens.

Instructions

Store a value from the user's machine in a secret field, unseen by the model.

Use this for values that cannot be generated by Delinea (e.g. AWS API keys, external tokens). The value is written with PUT /v1/secrets/{id}/fields/{slug} and never enters the conversation.

When the server runs locally (stdio):

  • file: sources are read and uploaded by the server directly; the file's contents are stored as-is (a trailing newline is dropped).

  • env: and stdin sources return a one-line command that runs this package's own Python to read the value (hidden prompt for stdin) and upload it. Nothing else needs to be installed. The command's job file holds a short-lived access token, is private, and deletes itself when used or after 15 minutes. With stdin the user must run the command in their own terminal.

Over HTTP transports a script is returned instead (bash needs curl and jq, cmd needs curl).

For new secrets, first create the secret (with a placeholder or via create_secret_with_generated_password), then use this tool to populate external fields.

Before modifying 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 modified. If the action is tied to a ticket, incident, or change request, that reference must be named in the comment.

Parameters

secret_id: ID of the existing secret to update. field_slug: Field slug name (e.g. "password", "username", "api-key"). Use check_secret_template to discover slugs. environment: Target shell — "bash", "powershell" or "cmd". source: Where to read the value. Options:

* ``"env:VAR_NAME"`` — read from environment variable *VAR_NAME*
* ``"file:/path/to/file"`` — read from a file
* ``"stdin"`` — prompt the user to type/paste (default)

comment: Required when the secret has requiresComment or requiresApproval set. Must explain why this secret is being modified 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 result (file: source) or command (env:/stdin) in local mode. 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>",
      "field_slug": "<field_slug>",
      "environment": "<environment>"
    },
    "name": "set_secret_field_environment_variable"
  }
}

Input Schema

NameRequiredDescriptionDefault
sourceNostdin
commentNo
secret_idYes
field_slugYes
environmentYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.0.0

TDQS

A4.4/5.0
Behavior5/5

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

Goes well beyond the annotations (readOnlyHint=false, idempotentHint=true, destructiveHint=false) by disclosing transport-dependent behavior: local stdio reads and uploads file: sources (trailing newline dropped), env:/stdin return a one-line command, the job file holds a short-lived token, is private, and self-deletes on use or after 15 minutes; HTTP transports return a shell script requiring curl and jq. It also flags that stdin requires the user to run the command in their own terminal. This is exactly the operational context an agent cannot get from 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.

Conciseness3/5

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

Front-loaded and organized, but the docstring scaffolding ("Parameters ----------", "Returns -------") is formatting noise, the comment requirement is stated twice, and the Returns block largely restates what the output schema already declares. The transport-mode details are valuable but could be tightened into fewer lines without losing meaning.

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?

For a five-parameter write tool with a security-sensitive side channel, the description covers the mode split, value-source handling, token lifetime, prerequisite approval checks, and required justification. Any agent reading this can pick the right transport branch and satisfy the approval preconditions without trial and error.

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 carries the full burden and does: source is documented with all three concrete forms (env:VAR_NAME, file:/path, stdin) including the default, environment supplies the three shell values absent from any schema enum, field_slug gives examples and points to check_secret_template for discovery, and comment states the conditional requirement. Every one of the five parameters gains meaning not present in the schema.

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?

The opening line states a specific verb and resource plus the defining property: store a value from the user's machine into a secret field without it entering the conversation. It also distinguishes itself from generation-based siblings ("values that cannot be generated by Delinea (e.g. AWS API keys)"). The one gap is that it never names update_secret_fields, the sibling that presumably writes values the model already holds, so that boundary must be inferred.

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 real when-to-use guidance (values Delinea cannot generate) and a sequencing rule for new secrets: create the secret first, then populate external fields here. It also prescribes a prerequisite workflow (get_secret summary, get_pending_access_requests, handle_access_request) and mandates the comment. It stops short of explicit when-not-to-use guidance against update_secret_fields, and the approval workflow is stated as a requirement without explaining what to do if approval is denied.

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