Skip to main content
Glama

AgentRail

Register agent

agentrail_register_agent

Enrol this agent with its owner, using the enrollment code the owner gave you (starts with ar_enroll_). Call this ONCE, before any other tool. Returns this agent's API key a single time; store it securely. The agent starts as pending_approval until the owner approves it; poll agentrail_heartbeat to see when it is active. Example: register "momentum-scanner" with code ar_enroll_abc....

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": {
      "enrollment_code": "<enrollment_code>",
      "name": "<name>"
    },
    "name": "agentrail_register_agent"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesShort readable name for this agent, e.g. "momentum-scanner".
enrollment_codeYesEnrollment code from the owner (starts with ar_enroll_).

Output Schema

NameRequiredDescriptionDefault
statusYes
api_keyYesShown ONCE. Send as "Authorization: Bearer <api_key>" on every later call.
agent_idYes
next_stepYes
approval_urlYes
api_key_noticeYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Adds substantial context beyond the annotations: the code is returned a single time and must be stored securely, the agent lands in a pending_approval state, and approval is observed via heartbeat polling. That covers secret exposure and the lifecycle. It does not spell out what happens on a second call (why 'ONCE' matters, e.g. error vs. duplicate registration), which would fully round out the non-idempotent behavior.

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 the action and the ordering constraint, then the return-value warning, then the state note. The trailing worked example largely duplicates the schema's own example for 'name', so it is slightly redundant, but the rest is dense and purposeful.

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 shape need not be explained, and the description still flags the one non-obvious return property (the one-time API key). Ordering, prerequisites, and post-call state tracking are all present for a two-parameter onboarding tool.

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 coverage is 100%, so both parameters are already documented with patterns, lengths, and examples; the description adds only the ar_enroll_ prefix reminder and a worked name example. Baseline 3 applies since the schema carries the semantic load.

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 and resource ('Enrol this agent with its owner') plus the credential it consumes ('the enrollment code the owner gave you'). The enrollment/registration scope is unmistakably distinct from the sibling heartbeat, fee, balance, and health tools.

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 explicit timing and sequencing: 'Call this ONCE, before any other tool.' It also names the follow-up alternative for tracking state ('poll agentrail_heartbeat to see when it is active'), so the agent knows both when to call this and what to call next instead.

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