Skip to main content
Glama

Create Agent

create_agent

Create a background agent that runs automatically based on triggers.

Do NOT create a new agent for follow-ups, event handlers, or scheduled checks that continue an existing agent's work — use add_trigger on that agent instead.

When the agent matches one of the built-in agent templates — the template_id enum lists them — set its template_id and seed workspace.inputs per that agent's skill guide. The template_id runs the template's setup; seed a template's inputs without it and the agent is not fully wired up. If no template fits, omit template_id and the agent runs as a general background agent.

You MUST call get_skill_guide('trigger_code') before writing any trigger's code — the qualification rules, sandbox globals, tool surface, and out contract live in the skill. code runs on the trigger's next firing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
goalYesComplete instructions for what the agent should accomplish. Write as if instructing another assistant. Name any outside resource a run reads (a Google Sheet, doc, file, URL) by the identifier its tool takes (the spreadsheet ID and tab, the URL), not only by its title — a later run doesn't see this chat.
titleYesShort name for the agent (e.g. "Outreach to Q2 leads", "Email triage")
triggersYesList of triggers that determine when the agent runs. An agent can have multiple triggers of different types (e.g. one schedule plus one event handler) — they fire independently. At least one trigger is required. In each trigger's prompt, name any outside resource a run reads (a Google Sheet, doc, file, URL) by the identifier its tool takes (the spreadsheet ID and tab, the URL), not only by its title — a later run doesn't see this chat.
workspaceNoOptional `{'inputs': {...}, 'outputs': {...}}` dict that seeds the agent's workspace. Name any outside resource a run reads (a Google Sheet, doc, file, URL) by the identifier its tool takes (the spreadsheet ID and tab, the URL), not only by its title — a later run doesn't see this chat.
template_idNoOptional template ID.
on_behalf_ofNoAn agency client's email, from list_agency_clients, to run this call in that client's account: their agents, settings, connected accounts, and credits. Omit it to act on your own account.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / on_behalf_of
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "An agency client's email, from list_agency_clients, to run this call in that client's account: their agents, settings, connected accounts, and credits. Omit it to act on your own account."
      +}
    • changedInput schema / properties / template_id / anyOf
      Previous value: -[
      -  {
      -    "enum": [
      -      "prospecting-agent",
      -      "linkedin-engagement",
      -      "thought-leadership-draft",
      -      "seo-blog-post",
      -      "weekly-sales-review",
      -      "social-listening",
      -      "company-monitor",
      -      "landing-page-analytics"
      -    ],
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "enum": [
      +      "prospecting-agent",
      +      "linkedin-engagement",
      +      "thought-leadership-draft",
      +      "seo-blog-post",
      +      "weekly-sales-review",
      +      "company-monitor",
      +      "landing-page-analytics"
      +    ],
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
  2. Changed1 schema field changed
    • changedInput schema / properties / triggers / items / anyOf
      Previous value: -[
      -  {
      -    "description": "Run on a recurring schedule.",
      -    "properties": {
      -      "code": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null
      -      },
      -      "days_of_week": {
      -        "anyOf": [
      -          {
      -            "items": {
      -              "type": "integer"
      -            },
      -            "type": "array"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null,
      -        "description": "Days to run: 0=Monday through 6=Sunday. Omit for every day."
      -      },
      -      "label": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null
      -      },
      -      "prompt": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null
      -      },
      -      "time_local": {
      -        "description": "Time of day in user's local timezone, e.g. '09:00'",
      -        "type": "string"
      -      },
      -      "type": {
      -        "const": "scheduled",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "type",
      -      "time_local"
      -    ],
      -    "title": "ScheduledTrigger",
      -    "type": "object"
      -  },
      -  {
      -    "description": "Run once at a specific time.",
      -    "properties": {
      -      "code": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null
      -      },
      -      "label": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null
      -      },
      -      "prompt": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null
      -      },
      -      "trigger_at": {
      -        "description": "ISO datetime string in UTC, e.g. '2026-03-25T18:00:00Z'",
      -        "type": "string"
      -      },
      -      "type": {
      -        "const": "one_time",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "type",
      -      "trigger_at"
      -    ],
      -    "title": "OneTimeTrigger",
      -    "type": "object"
      -  },
      -  {
      -    "description": "Run before each calendar meeting.",
      -    "properties": {
      -      "code": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null
      -      },
      -      "label": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null
      -      },
      -      "minutes_before": {
      -        "default": 15,
      -        "description": "Minutes before meeting start. 5-60.",
      -        "type": "integer"
      -      },
      -      "prompt": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null
      -      },
      -      "type": {
      -        "const": "before_meeting",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "type"
      -    ],
      -    "title": "BeforeMeetingTrigger",
      -    "type": "object"
      -  },
      -  {
      -    "description": "Run after each calendar meeting ends.",
      -    "properties": {
      -      "code": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null
      -      },
      -      "label": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null
      -      },
      -      "minutes_after": {
      -        "default": 10,
      -        "description": "Minutes after meeting end. 0-60.",
      -        "type": "integer"
      -      },
      -      "prompt": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null
      -      },
      -      "type": {
      -        "const": "after_meeting",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "type"
      -    ],
      -    "title": "AfterMeetingTrigger",
      -    "type": "object"
      -  },
      -  {
      -    "description": "Run when a specific event occurs.",
      -    "properties": {
      -      "code": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null
      -      },
      -      "label": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null
      -      },
      -      "prompt": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null
      -      },
      -      "type": {
      -        "enum": [
      -          "new_email",
      -          "all_email",
      -          "sent_email",
      -          "new_calendar_event",
      -          "new_meeting",
      -          "new_linkedin_message",
      -          "new_linkedin_message_from_prospect",
      -          "accepted_linkedin_invitation",
      -          "sent_linkedin_connection_request",
      -          "sent_linkedin_message",
      -          "sent_linkedin_inmail",
      -          "sent_linkedin_comment",
      -          "sent_linkedin_reaction",
      -          "sent_linkedin_follow",
      -          "resolved_profile",
      -          "new_post_engagers",
      -          "calendly_booking",
      -          "calendly_cancellation",
      -          "luma_event_created",
      -          "luma_guest_registered",
      -          "luma_guest_updated"
      -        ],
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "type"
      -    ],
      -    "title": "EventTrigger",
      -    "type": "object"
      -  },
      -  {
      -    "description": "A sequence node's enactment trigger — fires when a prospect enters `node_id`.\nManaged on any node (including a terminal, as a hook) via add_trigger / update_trigger /\nremove_trigger; define_sequence auto-mints one per enactable node.",
      -    "properties": {
      -      "code": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null
      -      },
      -      "label": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null
      -      },
      -      "node_id": {
      -        "type": "string"
      -      },
      -      "prompt": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null
      -      },
      -      "type": {
      -        "const": "on_enter",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "type",
      -      "node_id"
      -    ],
      -    "title": "OnEnterTrigger",
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "description": "Run on a recurring schedule.",
      +    "properties": {
      +      "code": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null
      +      },
      +      "days_of_week": {
      +        "anyOf": [
      +          {
      +            "items": {
      +              "type": "integer"
      +            },
      +            "type": "array"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "Days to run: 0=Monday through 6=Sunday. Omit for every day."
      +      },
      +      "label": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null
      +      },
      +      "prompt": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null
      +      },
      +      "time_local": {
      +        "description": "Time of day in user's local timezone, e.g. '09:00'",
      +        "type": "string"
      +      },
      +      "type": {
      +        "const": "scheduled",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "type",
      +      "time_local"
      +    ],
      +    "title": "ScheduledTrigger",
      +    "type": "object"
      +  },
      +  {
      +    "description": "Run once at a specific time.",
      +    "properties": {
      +      "code": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null
      +      },
      +      "label": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null
      +      },
      +      "prompt": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null
      +      },
      +      "trigger_at": {
      +        "description": "ISO datetime string in UTC, e.g. '2026-03-25T18:00:00Z'",
      +        "type": "string"
      +      },
      +      "type": {
      +        "const": "one_time",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "type",
      +      "trigger_at"
      +    ],
      +    "title": "OneTimeTrigger",
      +    "type": "object"
      +  },
      +  {
      +    "description": "Run before each calendar meeting.",
      +    "properties": {
      +      "code": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null
      +      },
      +      "label": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null
      +      },
      +      "minutes_before": {
      +        "default": 15,
      +        "description": "Minutes before meeting start. 5-60.",
      +        "type": "integer"
      +      },
      +      "prompt": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null
      +      },
      +      "type": {
      +        "const": "before_meeting",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "type"
      +    ],
      +    "title": "BeforeMeetingTrigger",
      +    "type": "object"
      +  },
      +  {
      +    "description": "Run after each calendar meeting ends.",
      +    "properties": {
      +      "code": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null
      +      },
      +      "label": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null
      +      },
      +      "minutes_after": {
      +        "default": 10,
      +        "description": "Minutes after meeting end. 0-60.",
      +        "type": "integer"
      +      },
      +      "prompt": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null
      +      },
      +      "type": {
      +        "const": "after_meeting",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "type"
      +    ],
      +    "title": "AfterMeetingTrigger",
      +    "type": "object"
      +  },
      +  {
      +    "description": "Run when a specific event occurs.",
      +    "properties": {
      +      "code": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null
      +      },
      +      "label": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null
      +      },
      +      "prompt": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null
      +      },
      +      "type": {
      +        "enum": [
      +          "new_email",
      +          "all_email",
      +          "sent_email",
      +          "new_calendar_event",
      +          "new_meeting",
      +          "new_linkedin_message",
      +          "new_linkedin_message_from_prospect",
      +          "accepted_linkedin_invitation",
      +          "sent_linkedin_connection_request",
      +          "sent_linkedin_message",
      +          "sent_linkedin_inmail",
      +          "sent_linkedin_comment",
      +          "sent_linkedin_reaction",
      +          "sent_linkedin_follow",
      +          "resolved_profile",
      +          "new_post_engagers",
      +          "luma_event_created",
      +          "luma_guest_registered",
      +          "luma_guest_updated"
      +        ],
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "type"
      +    ],
      +    "title": "EventTrigger",
      +    "type": "object"
      +  },
      +  {
      +    "description": "A sequence node's enactment trigger — fires when a prospect enters `node_id`.\nManaged on any node (including a terminal, as a hook) via add_trigger / update_trigger /\nremove_trigger; define_sequence auto-mints one per enactable node.",
      +    "properties": {
      +      "code": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null
      +      },
      +      "label": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null
      +      },
      +      "node_id": {
      +        "type": "string"
      +      },
      +      "prompt": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null
      +      },
      +      "type": {
      +        "const": "on_enter",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "type",
      +      "node_id"
      +    ],
      +    "title": "OnEnterTrigger",
      +    "type": "object"
      +  }
      +]
  3. Changed1 schema field changed
    • addedInput schema / properties / title / maxLength
      Added value: +255
  4. Changed3 schema fields changed
    • changedInput schema / properties / goal / description
      Previous value: -"Complete instructions for what the agent should accomplish. Write as if instructing another assistant."New value: +"Complete instructions for what the agent should accomplish. Write as if instructing another assistant. Name any outside resource a run reads (a Google Sheet, doc, file, URL) by the identifier its tool takes (the spreadsheet ID and tab, the URL), not only by its title — a later run doesn't see this chat."
    • changedInput schema / properties / triggers / description
      Previous value: -"List of triggers that determine when the agent runs. An agent can have multiple triggers of different types (e.g. one schedule plus one event handler) — they fire independently. At least one trigger is required."New value: +"List of triggers that determine when the agent runs. An agent can have multiple triggers of different types (e.g. one schedule plus one event handler) — they fire independently. At least one trigger is required. In each trigger's prompt, name any outside resource a run reads (a Google Sheet, doc, file, URL) by the identifier its tool takes (the spreadsheet ID and tab, the URL), not only by its title — a later run doesn't see this chat."
    • changedInput schema / properties / workspace / description
      Previous value: -"Optional `{'inputs': {...}, 'outputs': {...}}` dict that seeds the agent's workspace."New value: +"Optional `{'inputs': {...}, 'outputs': {...}}` dict that seeds the agent's workspace. Name any outside resource a run reads (a Google Sheet, doc, file, URL) by the identifier its tool takes (the spreadsheet ID and tab, the URL), not only by its title — a later run doesn't see this chat."
  5. Changed4 schema fields changed
    • changedInput schema / properties / goal / description
      Previous value: -"Complete instructions for what the task should accomplish. Write as if instructing another assistant."New value: +"Complete instructions for what the agent should accomplish. Write as if instructing another assistant."
    • changedInput schema / properties / title / description
      Previous value: -"Short name for the task (e.g. \"Outreach to Q2 leads\", \"Email triage\")"New value: +"Short name for the agent (e.g. \"Outreach to Q2 leads\", \"Email triage\")"
    • changedInput schema / properties / triggers / description
      Previous value: -"List of triggers that determine when the task runs. A task can have multiple triggers of different types (e.g. one schedule plus one event handler) — they fire independently. At least one trigger is required."New value: +"List of triggers that determine when the agent runs. An agent can have multiple triggers of different types (e.g. one schedule plus one event handler) — they fire independently. At least one trigger is required."
    • changedInput schema / properties / workspace / description
      Previous value: -"Optional `{'inputs': {...}, 'outputs': {...}}` dict that seeds the task's workspace."New value: +"Optional `{'inputs': {...}, 'outputs': {...}}` dict that seeds the agent's workspace."
  6. Added

TDQS

A4.5/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=false and destructiveHint=false; the description goes well beyond that by disclosing that a template_id 'runs the template's setup', that omitting it after seeding template inputs leaves the agent 'not fully wired up', that trigger code 'runs on the trigger's next firing', and that get_skill_guide('trigger_code') is mandatory before writing code. It does not cover return value, permissions, or credit consumption, so it is strong but not exhaustive.

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 the exclusion, then template wiring, then the mandatory prerequisite call. Four short paragraphs, each carrying distinct load; slightly dense but no filler sentences.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 6-parameter creation tool with nested trigger unions and no output schema, the description covers the creation semantics, the template wiring consequence, and the prerequisite skill guide call. It omits what is returned (e.g. an agent identifier) and any account/permission constraints beyond on_behalf_of's schema text.

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, but the description adds real meaning beyond the schema: it explains how template_id interacts with workspace.inputs seeding and what happens if you seed inputs without the template. It does not elaborate on on_behalf_of or trigger-level fields, leaving some parameters to the schema alone.

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+resource+mechanism: 'Create a background agent that runs automatically based on triggers.' It is immediately distinguishable from sibling create/update/delete tools, and the subsequent paragraphs sharpen the scope further rather than restating the name.

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 an explicit when-not rule with a named alternative: 'Do NOT create a new agent for follow-ups, event handlers, or scheduled checks that continue an existing agent's work — use add_trigger on that agent instead.' It also splits the template vs. general-agent case and states the condition that selects each.

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.

Resources