setUpAgentDuty
Add or change a duty of an agent you own or manage (work it does on its own: on a schedule, or when something happens in Stable Baseline), exactly as the duty editor does. settings without duty adds a duty from the editor's starting point (drafts only): name, kind (schedule or platform_event), tr...
This record as markdown: /tools/io-stablebaseline-sb/setupagentduty.md
What setUpAgentDuty does on Stable Baseline
AI agents use setUpAgentDuty to create or update resources in Stable Baseline, usually the action step of a workflow, after the agent has gathered context. Every call changes real data in your Stable Baseline environment.
| Parameter | Type | Required | Description |
|---|---|---|---|
duty | string | — | A duty's id or exact name. Leave it out to add one. |
agent | string | Yes | The agent's id or exact name. |
check | boolean | — | Check the settings without saving. |
status | string | — | |
settings | object | — | The duty's settings, as the duty editor saves them. |
Parameters from the server's own tool schema.
Why setUpAgentDuty is rated Medium
An AI agent can call setUpAgentDuty faster than any human can review: one bad instruction and it creates or modifies resources in Stable Baseline by the hundred, each call as confident as the last.
Risk signalsHigh parameter count (22 properties) · Bulk/mass operation — affects multiple targets
Attacks that exploit this kind of access
The rule that runs setUpAgentDuty safely
PolicyLayer is an MCP gateway: it sits between your AI agents and Stable Baseline, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For setUpAgentDuty, this is the rule to start with:
setUpAgentDuty stays usable, but capped: an agent stuck in a loop can't make hundreds of changes a minute. Everything else on the server is denied unless you say otherwise.
The button opens the PolicyLayer dashboard: create your workspace, connect Stable Baseline, apply this rule, and every setUpAgentDuty call is checked against it from then on.
Questions about setUpAgentDuty
Add or change a duty of an agent you own or manage (work it does on its own: on a schedule, or when something happens in Stable Baseline), exactly as the duty editor does. settings without duty adds a duty from the editor's starting point (drafts only): name, kind (schedule or platform_event), trigger and instructions are needed. settings with duty (its id or exact name) changes only the settings named (each replaces that setting whole; the kind never changes). check: true checks the settings without saving. status pauses, resumes, turns on or turns off a duty. Every save is checked first, and a failed check saves nothing and names each problem. Triggers: schedule {type: daily, time: "08:00", weekdays: [mon, tue, ...]} or {type: interval, everyMinutes} or {type: monthly, day, time} or {type: once, at} or {type: cron, expression}; platform_event {event (document_added, document_changed, row_added, row_changed, task_overdue, meeting_ended, item_added, item_changed, plan_changed, phase_changed), scope {type, id}}. Through a connection a duty always asks before acting and sends nothing on its own; connected apps (a mailbox, a chat), a duty that watches one, and reading web pages are chosen by a person in Stable Baseline, so a duty that uses a connected app is only paused or turned off here; and a duty is added, changed or started only for an agent that reaches no further than this connection does, because a duty works later on its own, as far as its agent reaches. Removing a duty is the person's, on its page. Needs "Set up agents" on this connection. Read an agent's duties with listAgents (agentId). It is categorised as a Write tool in the Stable Baseline MCP Server, which means it can create or modify data. Consider rate limits to prevent runaway writes.
setUpAgentDuty accepts 5 parameters: duty, agent, check, status, settings. Required: agent. The full parameter table on this page comes from the server's own tool schema.
Register the Stable Baseline MCP server in PolicyLayer and add a rule for setUpAgentDuty: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Stable Baseline. Nothing to install.
setUpAgentDuty is a Write tool with medium risk. Write tools should be rate-limited to prevent accidental bulk modifications.
Yes. Add a rate_limit block to the setUpAgentDuty rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for setUpAgentDuty. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
setUpAgentDuty is provided by the Stable Baseline MCP server (https://api.stablebaseline.io/functions/v1/cloud-serve/mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on Stable Baseline, and thousands of servers like it.
This server
Across the catalogue