> ## Documentation Index
> Fetch the complete documentation index at: https://docs.melso.ai/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Melso product MCP: https://melso.ai/api/mcp (OAuth; one company per grant). REST: https://melso.ai. Documentation-search MCP: https://docs.melso.ai/mcp. The docs search server does not act on customer accounts.
>
> Use the live tool schema and respect company membership. Ask the person to authorize the exact fiscal document version in the signed-in app. A professional prepares and files included returns after authorization; AI does not file alone. A prepared file or approval receipt is not evidence of filing. Never claim completion from an accepted Task or Run. Keep credentials out of chat and logs. Agents features are internal or by private invitation.

# secrets_set

> Input, output and examples for the secrets_set MCP tool.

<Info>Melso Agents is available only internally or by private invitation. Agents-specific features require existing access. For the autónomo fiscal service, see [Get started](/essentials/quickstart).</Info>

Save a login, card or text secret in your Vault, replacing your item with the same variable name. Only use it with a value you already have; to get one from a person, use secrets action request instead of asking in chat. Upload a file with a multipart POST (see the server instructions).

**Availability:** Autónomo / Empresa / Agents invitation / OAuth-only.

**Catalog:** Advanced (`tools_search`, then `tools_call`).

The live catalog is authoritative: company type, membership, plan, connected apps and execution context can narrow this contract. [Understand access](/mcp/permissions).

## Input

### Agents / Autónomo / Company schema

```json theme={null}
{
  "additionalProperties": false,
  "properties": {
    "area_ids": {
      "description": "Area UUIDs when share is areas.",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "card": {
      "additionalProperties": false,
      "properties": {
        "billing_address": {
          "description": "Optional billing address.",
          "type": "string"
        },
        "cardholder": {
          "description": "Name on the card.",
          "type": "string"
        },
        "cvc": {
          "description": "Security code.",
          "type": "string"
        },
        "exp_month": {
          "type": "integer"
        },
        "exp_year": {
          "type": "integer"
        },
        "number": {
          "description": "Card number.",
          "type": "string"
        }
      },
      "required": [
        "number",
        "exp_month",
        "exp_year",
        "cvc"
      ],
      "type": "object"
    },
    "env_name": {
      "description": "Optional variable name for a login or card. Derived from name when empty.",
      "type": "string"
    },
    "kind": {
      "enum": [
        "login",
        "card",
        "text"
      ],
      "type": "string"
    },
    "login": {
      "additionalProperties": false,
      "properties": {
        "password": {
          "description": "Password.",
          "type": "string"
        },
        "totp_secret": {
          "description": "Optional base32 2FA setup key.",
          "type": "string"
        },
        "url": {
          "description": "Website.",
          "type": "string"
        },
        "username": {
          "description": "Email or username.",
          "type": "string"
        }
      },
      "required": [
        "url",
        "username",
        "password"
      ],
      "type": "object"
    },
    "name": {
      "description": "Login or card name, or the text secret's variable name such as OPENAI_API_KEY.",
      "type": "string"
    },
    "share": {
      "description": "Who else can use it. private: only you, your Runs and your chat. workspace: every Run in the company. areas: Runs in area_ids. Default private.",
      "enum": [
        "private",
        "workspace",
        "areas"
      ],
      "type": "string"
    },
    "value": {
      "description": "Text secret value.",
      "type": "string"
    }
  },
  "required": [
    "kind",
    "name"
  ],
  "type": "object"
}
```

## Output

The saved secret’s metadata. Treat a secret value as write-only; never copy it into a Task message or a log.

The result uses MCP `content` blocks; JSON payloads are encoded in text and may also appear in `structuredContent`. Check `isError` before reading a success payload. The server does not currently declare an `outputSchema`, so treat additional fields as extensible. [Result handling](/mcp/results).

## Example

Use an OAuth access token issued for this MCP resource (a Run token for Run-only tools). Replace example identifiers with values from your own account. Write actions change data.

First discover `secrets_set` with `tools_search` and confirm that the live schema permits these arguments.

```bash theme={null}
curl --fail-with-body https://melso.ai/api/mcp \
  -H "Authorization: Bearer $MELSO_MCP_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  --data-binary @- <<'JSON'
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "tools_call",
    "arguments": {
      "name": "secrets_set",
      "arguments": {
        "kind": "text",
        "name": "EXAMPLE_TEST_VALUE",
        "value": "example-test-value"
      }
    }
  }
}
JSON
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.