Skip to main content
Glama
Infisical MCP Server

Infisical MCP Server

Official
by Infisical

get-secret

Read-onlyIdempotent

Retrieve a named secret and its value from a specific Infisical project and environment, with optional path, imported secret, and reference expansion support.

Instructions

Get one secret, with its value, by name.

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": {
      "projectId": "<projectId>",
      "environmentSlug": "<environmentSlug>",
      "secretName": "<secretName>"
    },
    "name": "get-secret"
  }
}

Input Schema

NameRequiredDescriptionDefault
projectIdYesThe ID of the project, from list-projects. A project slug or exact project name also works.
secretNameYesThe name of the secret to get
secretPathNoThe folder path, such as "/" for the root or "/backend/api" for a nested folder. Defaults to "/".
includeImportsNoWhether to include secret imports. If the secret isn't found, it will try to find a secret in a secret import that matches the requested secret name (Defaults to true)
environmentSlugYesThe slug of the environment, such as dev, staging or prod. list-projects shows each project's environments. An environment name such as Production also works.
expandSecretReferencesNoReplace references to other secrets, such as ${DB_HOST}, with their values (Defaults to true)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv0.1.0
    • changedInput schema / properties / environmentSlug / description
      Previous value: -"The slug of the environment to get the secret from (required)"New value: +"The slug of the environment, such as dev, staging or prod. list-projects shows each project's environments. An environment name such as Production also works."
    • changedInput schema / properties / expandSecretReferences / description
      Previous value: -"Whether to expand secret references (Defaults to true)"New value: +"Replace references to other secrets, such as ${DB_HOST}, with their values (Defaults to true)"
    • changedInput schema / properties / projectId / description
      Previous value: -"The ID of the project to get the secret from (required)"New value: +"The ID of the project, from list-projects. A project slug or exact project name also works."
    • changedInput schema / properties / secretName / description
      Previous value: -"The name of the secret to get (required)"New value: +"The name of the secret to get"
    • changedInput schema / properties / secretPath / description
      Previous value: -"The path of the secret to get (Defaults to /)"New value: +"The folder path, such as \"/\" for the root or \"/backend/api\" for a nested folder. Defaults to \"/\"."
  2. First observedv1.0.0

TDQS

B3.3/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint and destructiveHint=false, so the safety profile is covered structurally. The description adds the meaningful trait that the call returns the secret's plaintext value ('with its value'), which is sensitive-return context not present in annotations, but it omits error behavior for a missing secret and any permission or decryption requirements.

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?

A single, front-loaded sentence with the verb first and no filler wording. Every word contributes to identifying the operation and its result.

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?

With six parameters, no output schema and only a partial hint at the return content, the description leaves the agent to infer the response shape, what happens when the secret is absent, and how secretPath interacts with name collisions. Given that the schema and annotations are rich, this is adequate but not complete for a sensitive-value retrieval tool.

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 every parameter including secretPath, includeImports and expandSecretReferences is already documented in the input schema. The description only restates that the lookup is 'by name', adding no semantics beyond what the schema provides; baseline 3 applies.

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 description gives a specific verb and resource ('Get one secret') and scopes it to a single item looked up 'by name', which distinguishes it from the list-secrets sibling in the catalog. It stops short of naming or contrasting the alternatives explicitly, so it is clear but not fully differentiated.

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

Usage Guidelines2/5

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

There is no when-to-use or when-not-to-use guidance: nothing tells the agent to prefer this over list-secrets or a search-style tool when the name is unknown, and nothing mentions prerequisites such as access to the environment. The reader has to infer the usage context from the name alone.

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