Skip to main content
Glama

Write an agent

agent_write
DestructiveIdempotent

Create an agent or replace an existing one. description and body are required; model and tools are optional and keep their previous value when left out. Docs: https://only-mcp.com/docs/what-is-onlymcp#what-sits-behind-the-one-address

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": {
      "name": "<name>",
      "description": "<description>",
      "body": "<body>"
    },
    "name": "agent_write"
  }
}

Input Schema

NameRequiredDescriptionDefault
bodyYesThe agent definition. A frontmatter head (description, model, tools) is read into the fields and not kept in the body.
nameYesLowercase name with dashes.
modelNoModel to run it on, for example sonnet.
toolsNoTool names the agent may use. Empty means all.
descriptionYesOne line: when this agent should be used.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / body / description
      Previous value: -"The full agent definition, frontmatter included."New value: +"The agent definition. A frontmatter head (description, model, tools) is read into the fields and not kept in the body."
  2. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already flag destructiveHint=true and idempotentHint=true; the description usefully explains why by disclosing upsert semantics and the omit-and-retain behavior for model/tools. It stops short of saying what exactly is lost on replace (e.g., whether an existing body is fully overwritten) and does not describe the return value.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two tight sentences: the operation and its upsert nature come first, then the required/optional rules, then a reference link. Nothing is redundant and no sentence needs to be re-read.

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?

With annotations covering the safety profile and a fully documented 5-parameter schema, the description supplies the missing piece — partial-update semantics. It would be complete at 5 if it clarified the replace path (overwrite vs merge of body) and whether the call returns the resulting agent definition.

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 semantics beyond the schema: which fields are mandatory and that omitted optional fields retain their prior value rather than being cleared. That retention rule is behavior an agent could not infer from the property descriptions alone.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

"Create an agent or replace an existing one" gives a specific verb and resource plus the upsert nature, which distinguishes it from the read-only siblings (get_agent_definition, list_agents) and from agent_delete. It does not explicitly name a sibling to route away from, so it falls short of the top band.

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

Usage Guidelines3/5

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

The create-or-replace framing implies when to call it, and the required/optional split tells the agent how to call it. However, there is no explicit statement of when NOT to use it versus neighbors like skill_write or agent_delete, and no prerequisites (e.g., whether the agent must already exist for replacement) are stated.

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