Skip to main content
Glama

create_agent_identity

Creates a new unique agent identity and persists its profile to Git, generating a memorable adjective+noun name so worker agents can join projects without overwriting existing profiles.

Instructions

Create a new, unique agent identity and persist its profile to Git.

How this differs from register_agent

  • Always creates a new identity with a fresh unique name (never updates an existing one).

  • name_hint, if provided, MUST be a valid adjective+noun combination and must be available, otherwise an error is raised. Without a hint, a random adjective+noun name is generated.

CRITICAL: Agent Naming Rules

  • Agent names MUST be randomly generated adjective+noun combinations

  • Examples: "GreenCastle", "BlueLake", "RedStone", "PurpleBear"

  • Names should be unique, easy to remember, and NOT descriptive

  • INVALID examples: "BackendHarmonizer", "DatabaseMigrator", "UIRefactorer"

  • Best practice: Omit name_hint to auto-generate a valid name (RECOMMENDED)

When to use

  • Spawning a brand new worker agent that should not overwrite an existing profile.

  • Temporary task-specific identities (e.g., short-lived refactor assistants).

Parameters

return_registration_token : bool, default True When True (default, current behaviour), the response includes the freshly-minted registration_token. When False, the token is omitted from the tool result so transcript-visible MCP sessions can satisfy a "do not echo secrets into scrollback" contract; the agent is still bound to the current MCP session via _bind_session_agent, so follow-up calls in the same session can authenticate without ever surfacing the token. The token still exists on the server and can be retrieved or rotated through the normal admin paths. See issue #154.

Returns

dict { id, name, program, model, task_description, inception_ts, last_active_ts, project_id, registration_token? }

Examples

Auto-generate name (RECOMMENDED):

{"jsonrpc":"2.0","id":"c2","method":"tools/call","params":{"name":"create_agent_identity","arguments":{
  "project_key":"/data/projects/backend","program":"claude-code","model":"opus-4.1"
}}}

With valid name hint:

{"jsonrpc":"2.0","id":"c1","method":"tools/call","params":{"name":"create_agent_identity","arguments":{
  "project_key":"/data/projects/backend","program":"codex-cli","model":"gpt5-codex","name_hint":"GreenCastle",
  "task_description":"DB migration spike"
}}}

Transcript-safe creation (issue #154) — omit the token from the visible tool result and rely on session binding for follow-ups:

{"jsonrpc":"2.0","id":"c3","method":"tools/call","params":{"name":"create_agent_identity","arguments":{
  "project_key":"/data/projects/backend","program":"codex-cli","model":"gpt5",
  "return_registration_token":false
}}}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelYes
formatNo
programYes
name_hintNo
project_keyYes
task_descriptionNo
attachments_policyNoauto
return_registration_tokenNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.4

TDQS

A4.4/5.0
Behavior5/5

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

No annotations are provided, so the description carries the full burden and does so: it states this never updates an existing profile, that an invalid/unavailable name_hint raises an error, that random adjective+noun generation occurs otherwise, that profiles are persisted to Git, and it explains the registration-token/session-binding contract (issue #154). This is well beyond what any structured field supplies.

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

Conciseness3/5

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

Purpose and sibling differentiation are correctly front-loaded, but the definition is bloated: three full JSON-RPC examples, and the third example re-demonstrates the return_registration_token behavior already described at length in the Parameters section. The naming-rules block with invalid examples is long for what it conveys.

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 creation tool with an output schema (so return values need not be re-explained) and 8 params, the description covers naming rules, error conditions, sibling differences, and the token contract. It falls short only on the undocumented format and attachments_policy parameters.

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

Parameters3/5

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

Schema description coverage is 0%, so the description must compensate, and it does for name_hint (validation rules, error behavior, recommended omission) and return_registration_token (default, transcript-safety, session binding). However, format and attachments_policy are never mentioned, and project_key/program/model/task_description are only demonstrated inside examples rather than explained.

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?

States a specific verb+resource ('Create a new, unique agent identity and persist its profile to Git') and immediately distinguishes it from the closest sibling, register_agent. An agent can tell it apart from register_agent/deregister_agent without opening any 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?

Has an explicit 'How this differs from register_agent' section plus a 'When to use' list (brand-new worker, temporary task-specific identity) and a best-practice recommendation to omit name_hint. The alternative and the conditions that select each path are named outright.

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