get-secret
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
| Name | Required | Description | Default |
|---|---|---|---|
| projectId | Yes | The ID of the project, from list-projects. A project slug or exact project name also works. | |
| secretName | Yes | The name of the secret to get | |
| secretPath | No | The folder path, such as "/" for the root or "/backend/api" for a nested folder. Defaults to "/". | |
| includeImports | No | Whether 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) | |
| environmentSlug | Yes | 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. | |
| expandSecretReferences | No | Replace references to other secrets, such as ${DB_HOST}, with their values (Defaults to true) |