Skip to main content
Glama

Set agent credentials

set_agent_credentials
Destructive

Save credential fields on a deployed agent: API keys, bot tokens, account IDs, allow lists, your own OAuth app keys, or the token for a browser-free connection. Call with only credential (no fields) to see that credential's field keys, formats, which are required, how it connects, 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. A key file, such as a Google service account JSON or an App Store .p8 key, takes the file's text, never a link: never ask for a public link to a key (the user can also upload it on the agent's page in the Wiro dashboard). Other file fields 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. Fields saved for a sign-in integration that is not connected yet, such as its app keys or token, leave it running too: it restarts once, when connect_agent_oauth completes the connection. A key the agent or Wiro asks for in its chat is saved here, never sent in a message. Channels such as Telegram, Slack and Discord 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. Sign-in integrations (such as Google Ads, YouTube, Meta and HubSpot) are then connected with connect_agent_oauth; Gmail, Google Calendar and Google Drive are not sign-ins and are set here. To connect a Wiro project (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. 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 "google-ads". 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. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Goes well beyond the annotations: validates every field before writing, refuses unknown or Wiro-managed fields, never echoes values back, restarts running agents (with precise exceptions for stopping/queued/unchanged/sign-in-pending cases), auto-enables channels and scheduled tasks, and states the admin requirement on team agents. It even discloses billing consequences for Wiro project keys, matching destructiveHint=true without contradicting it.

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?

Front-loaded with purpose and the describe-then-write workflow, and nearly every sentence carries operational information. It is a dense single paragraph, however, and would scan faster with the restart, channel, and permission rules broken into separate lines; length is justified by tool complexity but the formatting is not.

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?

An output schema exists, so return values need no explanation, and the result-naming of paused scheduled tasks is still mentioned. Combined with validation rules, restart semantics, permission constraints, and routing to connect_agent_oauth/bind_agent_project/get_playbook, nothing an agent needs to call this correctly is missing.

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%, so the baseline is 3; the description adds real meaning on top by explaining the credential-only describe mode, that a key file takes file text rather than a public link, that other files take public URLs, and that fields of one credential should be sent together. It does not re-explain ordinal/parent_field, but those are already well documented in the schema.

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 credential fields on a deployed agent," then enumerates the credential kinds (API keys, bot tokens, account IDs, allow lists, OAuth app keys, browser-free tokens). An agent can immediately tell this apart from connect_agent_oauth or bind_agent_project.

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?

Explicitly describes two calling modes — credential-only to inspect fields (nothing written), then fields to save — and says to skip the inspect call when list_agent_skills already showed the fields. It also routes clearly: sign-in integrations go through connect_agent_oauth, Wiro projects through bind_agent_project, and it warns off asking non-admin team members for values.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.