Skip to main content
Glama

Set agent credentials

set_agent_credentials
Destructive

Saves and validates a deployed agent's credential fields—chat channel tokens and allowed IDs, Twilio Voice, support/website settings, and Wiro project key—refusing unknown fields before writing.

Instructions

Save the credential fields of a deployed agent: its chat channels (Telegram, Slack, Discord: bot tokens and the IDs allowed to message it), Twilio Voice, settings such as a support email or a website, and the Wiro project key. Outside services are Connectors and connect with connect_agent_connector instead. Call with only credential (no fields) to see that credential's field keys, formats, which are required and what is already set on this agent; nothing is written then. Skip that call when list_agent_skills with name already showed the fields. Then call with fields. Every field is checked before anything is written; unknown or Wiro-managed fields are refused. File fields, such as Twilio Voice's hold audio, take a public URL and the file is uploaded. Values are never echoed back. A running agent restarts to load values that change, and one still stopping or queued for a restart, such as after a setup change approved in its chat, loads them with that restart; a save that changes nothing leaves it running. A channel key the agent asks for in its chat is saved here, never sent in a message; a setup proposal never names a channel. Channels turn on by themselves once all their required fields are set, and turn off when one is cleared. Saving a credential turns on the scheduled tasks that need it, and the result names any that stay paused until a skill they need is on; turn off any you do not want. To set the Wiro project the agent's video and voice skills run models with (credential "wiro"), use bind_agent_project first: it takes no key. Only save a Wiro project API key here that the user gave you for this: model runs are billed to the wallet of the workspace that owns the project. The agent's model tools (wiro__*) come from the wiro connector (connect_agent_connector), which runs with this same project. On a team agent this needs a team admin or the person who deployed it; other team members can read the agent with get_my_agent and message it, so do not ask them for values they cannot save. The agents playbook (get_playbook) has the full setup walkthrough.

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": {
      "agent_guid": "<agent_guid>"
    },
    "name": "set_agent_credentials"
  }
}

Input Schema

NameRequiredDescriptionDefault
fieldsNoFields to save. Send the fields of one credential together.
agent_guidYesThe deployed agent's guid, from list_my_agents.
credentialNoDescribe mode: a credential key such as "telegram" or "twilio-voice". Used when fields is empty.

Output Schema

NameRequiredDescriptionDefault
modeYes
notesYes
errorsNo
appliedNo
channelsNo
agentGuidYes
credentialNo
nextActionNo
agentStatusNo
credentialsNo
uploadedFilesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changedv2.0.0
    • changedInput schema / properties / credential / description
      Previous value: -"Describe mode: a credential key such as \"telegram\" or \"google-ads\". Used when fields is empty."New value: +"Describe mode: a credential key such as \"telegram\" or \"twilio-voice\". Used when fields is empty."
    • changedInput schema / properties / fields / items / properties / credential / description
      Previous value: -"Credential key, for example \"telegram\", \"gmail\" or \"meta-ads\"."New value: +"Credential key, for example \"telegram\", \"slack\" or \"twilio-voice\"."
    • changedInput schema / properties / fields / items / properties / field / description
      Previous value: -"Field key inside that credential, for example \"bottoken\". Use \"authmethod\" to pick a connection mode (for example \"api_key\")."New value: +"Field key inside that credential, for example \"bottoken\"."
    • changedInput schema / properties / fields / items / properties / value / description
      Previous value: -"The value. Lists are JSON arrays; a list of objects replaces the whole list. A key file takes the file's text; other files take a public http(s) URL. An empty value clears an optional field. A required field cannot be cleared, except on a chat channel, which then turns off."New value: +"The value. Lists are JSON arrays; a list of objects replaces the whole list. A file takes a public http(s) URL. An empty value clears an optional field. A required field cannot be cleared, except on a chat channel, which then turns off."
    • removedOutput schema / properties / credential / properties / connectionModes
      Removed value: -{
      -  "items": {
      -    "additionalProperties": false,
      -    "properties": {
      -      "available": {
      -        "type": "boolean"
      -      },
      -      "fields": {
      -        "items": {
      -          "additionalProperties": false,
      -          "properties": {
      -            "field": {
      -              "type": "string"
      -            },
      -            "isSet": {
      -              "type": "boolean"
      -            },
      -            "label": {
      -              "type": "string"
      -            },
      -            "writeOnly": {
      -              "type": "boolean"
      -            }
      -          },
      -          "required": [
      -            "field",
      -            "label",
      -            "isSet"
      -          ],
      -          "type": "object"
      -        },
      -        "type": "array"
      -      },
      -      "mode": {
      -        "type": "string"
      -      },
      -      "needsBrowser": {
      -        "type": "boolean"
      -      },
      -      "note": {
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "mode",
      -      "available",
      -      "needsBrowser",
      -      "fields",
      -      "note"
      -    ],
      -    "type": "object"
      -  },
      -  "type": "array"
      -}
    • removedOutput schema / properties / credential / properties / fields / items / properties / modes
      Removed value: -{
      -  "items": {
      -    "type": "string"
      -  },
      -  "type": "array"
      -}
    • changedOutput schema / properties / credential / properties / kind / enum
      Previous value: -[
      -  "fields",
      -  "sign_in",
      -  "channel"
      -]New value: +[
      +  "fields",
      +  "channel"
      +]
    • removedOutput schema / properties / credential / properties / ownAppRedirectUri
      Removed value: -{
      -  "type": "string"
      -}
  2. Changed25 schema fields changedv1.5.3
    • removedInput schema / properties / fields / items / additionalProperties
      Removed value: -false
    • addedInput schema / properties / fields / items / properties / ordinal / maximum
      Added value: +9007199254740991
    • changedInput schema / properties / fields / items / properties / value / anyOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "boolean"
      -  },
      -  {
      -    "type": "null"
      -  },
      -  {
      -    "items": {
      -      "anyOf": [
      -        {
      -          "type": "string"
      -        },
      -        {
      -          "type": "number"
      -        },
      -        {
      -          "additionalProperties": {},
      -          "type": "object"
      -        }
      -      ]
      -    },
      -    "type": "array"
      -  }
      -]New value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "number"
      +  },
      +  {
      +    "type": "boolean"
      +  },
      +  {
      +    "type": "null"
      +  },
      +  {
      +    "items": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "number"
      +        },
      +        {
      +          "additionalProperties": {},
      +          "propertyNames": {
      +            "type": "string"
      +          },
      +          "type": "object"
      +        }
      +      ]
      +    },
      +    "type": "array"
      +  }
      +]
    • addedOutput schema / properties / applied / maximum
      Added value: +9007199254740991
    • removedOutput schema / properties / credential / properties / fields / items / properties / itemFields / items / properties / itemFields / items / properties / field / $ref
      Removed value: -"#/properties/credential/properties/fields/items/properties/itemFields/items/properties/field"
    • addedOutput schema / properties / credential / properties / fields / items / properties / itemFields / items / properties / itemFields / items / properties / field / type
      Added value: +"string"
    • removedOutput schema / properties / credential / properties / fields / items / properties / itemFields / items / properties / itemFields / items / properties / help / $ref
      Removed value: -"#/properties/credential/properties/fields/items/properties/itemFields/items/properties/help"
    • addedOutput schema / properties / credential / properties / fields / items / properties / itemFields / items / properties / itemFields / items / properties / help / type
      Added value: +"string"
    • removedOutput schema / properties / credential / properties / fields / items / properties / itemFields / items / properties / itemFields / items / properties / label / $ref
      Removed value: -"#/properties/credential/properties/fields/items/properties/itemFields/items/properties/label"
    • addedOutput schema / properties / credential / properties / fields / items / properties / itemFields / items / properties / itemFields / items / properties / label / type
      Added value: +"string"
    • removedOutput schema / properties / credential / properties / fields / items / properties / itemFields / items / properties / itemFields / items / properties / options / $ref
      Removed value: -"#/properties/credential/properties/fields/items/properties/itemFields/items/properties/options"
    • addedOutput schema / properties / credential / properties / fields / items / properties / itemFields / items / properties / itemFields / items / properties / options / items
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / credential / properties / fields / items / properties / itemFields / items / properties / itemFields / items / properties / options / type
      Added value: +"array"
    • removedOutput schema / properties / credential / properties / fields / items / properties / itemFields / items / properties / itemFields / items / properties / pattern / $ref
      Removed value: -"#/properties/credential/properties/fields/items/properties/itemFields/items/properties/pattern"
    • addedOutput schema / properties / credential / properties / fields / items / properties / itemFields / items / properties / itemFields / items / properties / pattern / type
      Added value: +"string"
    • removedOutput schema / properties / credential / properties / fields / items / properties / itemFields / items / properties / itemFields / items / properties / required / $ref
      Removed value: -"#/properties/credential/properties/fields/items/properties/itemFields/items/properties/required"
    • addedOutput schema / properties / credential / properties / fields / items / properties / itemFields / items / properties / itemFields / items / properties / required / type
      Added value: +"boolean"
    • removedOutput schema / properties / credential / properties / fields / items / properties / itemFields / items / properties / itemFields / items / properties / type / $ref
      Removed value: -"#/properties/credential/properties/fields/items/properties/itemFields/items/properties/type"
    • addedOutput schema / properties / credential / properties / fields / items / properties / itemFields / items / properties / itemFields / items / properties / type / type
      Added value: +"string"
    • removedOutput schema / properties / credentials / items / $ref
      Removed value: -"#/properties/credential/properties/status/anyOf/0"
    • addedOutput schema / properties / credentials / items / additionalProperties
      Added value: +false
    • addedOutput schema / properties / credentials / items / properties
      Added value: +{
      +  "connected": {
      +    "type": "boolean"
      +  },
      +  "filled": {
      +    "type": "boolean"
      +  },
      +  "key": {
      +    "type": "string"
      +  },
      +  "missingFields": {
      +    "items": {
      +      "type": "string"
      +    },
      +    "type": "array"
      +  },
      +  "optional": {
      +    "type": "boolean"
      +  },
      +  "requiredMissing": {
      +    "type": "boolean"
      +  },
      +  "title": {
      +    "type": "string"
      +  }
      +}
    • addedOutput schema / properties / credentials / items / required
      Added value: +[
      +  "key",
      +  "title",
      +  "connected",
      +  "filled",
      +  "requiredMissing",
      +  "optional",
      +  "missingFields"
      +]
    • addedOutput schema / properties / credentials / items / type
      Added value: +"object"
    • addedOutput schema / properties / nextAction / properties / arguments / propertyNames
      Added value: +{
      +  "type": "string"
      +}
  3. Changed1 schema field changedv1.5.1
    • addedOutput schema / properties / credential / properties / connectionModes / items / properties / fields / items / properties / writeOnly
      Added value: +{
      +  "type": "boolean"
      +}
  4. Addedv1.4.1

TDQS

A4.8/5.0
Behavior5/5

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

Goes far beyond the supplied annotations (destructive/openWorld/non-idempotent) by disclosing validation-before-write, refusal of unknown or Wiro-managed fields, file fields taking a public URL that gets uploaded, that values are never echoed back, and restart semantics for running/stopping agents. It also flags billing consequences of a Wiro key and the team-permission requirement (team admin or deployer). That is exactly the operational context annotations cannot carry.

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?

Purpose is front-loaded, then alternatives, then the describe-mode recipe, then write-time behavior — a logical order. It is dense and long, with a few clauses that stack multiple ideas per sentence (restart/scheduled-task interactions), but nearly every sentence carries decision-relevant information for a genuinely multi-mode tool.

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 destructive, open-world mutation tool with an output schema already describing results, the description covers what an agent still needs: permissions, validation and refusal rules, file upload convention, restart consequences, channel auto-enable/disable, and scheduled-task side effects. No material gap remains for correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and the schema already documents field/value/ordinal/parent_field thoroughly, so the baseline is 3. The description adds real meaning on top: the describe-mode use of `credential` when `fields` is empty, that nothing is written then, and the caveat that a Wiro API key is only for user-supplied keys via bind_agent_project.

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?

Opens with a specific verb and resource: "Save the credential fields of a deployed agent," then enumerates exactly what counts as a credential (chat channels, Twilio Voice, settings, Wiro project key). It explicitly distinguishes itself from Connectors/connect_agent_connector and from bind_agent_project, so an agent can route correctly without opening the schema.

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

Usage Guidelines5/5

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

Gives explicit modes and alternatives: call with only `credential` and no fields to inspect keys/formats/required status with nothing written, skip that when list_agent_skills already showed the fields, then call with `fields`. It also names the alternative tools for adjacent jobs (connect_agent_connector for connectors, bind_agent_project for the Wiro project, get_my_agent for read-only team members).

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