Skip to main content
Glama

Adopt discovered trace source

adopt_discovered_agent
Idempotent

Adopt a discovered trace source to count its traces under an agent from now on: create a new agent or merge into an existing one.

Instructions

Requires the write scope or higher. Counts a discovered trace source's traces under an agent from now on. Without agent_id, a new agent named after the source is created (409 AGENT_EXISTS when its slug is taken). With agent_id (e.g. a suggested_agent_id), the source merges into that agent. Earlier traces stay where they are (backfilled is false). Re-adopting into the same agent changes nothing; into a different one is 409 ALREADY_ADOPTED. untrusted_fields names the data fields LastPing did not write (job output, exporter data or user-supplied names).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesDiscovered source UUID (from list_discovered_agents).
agent_idNoOptional agent UUID (from list_agents) to merge the source into. Omitted: a new agent is created.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.1.17
    • changedInput schema / properties / agent_id / description
      Previous value: -"Optional agent UUID (from list_agents) to merge the source into. Omit to create a new agent."New value: +"Optional agent UUID (from list_agents) to merge the source into. Omitted: a new agent is created."
  2. Addedv0.1.6

TDQS

A4.7/5.0
Behavior5/5

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

Goes well beyond the annotations: it states the required write scope, discloses that earlier traces are NOT backfilled, and documents the specific 409 failure modes (AGENT_EXISTS, ALREADY_ADOPTED) that an agent must anticipate. The idempotency nuance matches idempotentHint=true without contradicting it.

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 permission requirement and the core behavior, and most sentences carry actionable semantics. The closing sentence about `untrusted_fields` names no parameter in the input schema, making it the one item whose placement is questionable.

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 two-parameter mutation with no output schema, the description covers auth scope, backfill behavior, and error conditions thoroughly. It never says what the call returns (e.g. the adopted or created agent id), and the `untrusted_fields` reference is unexplained, so a small gap remains.

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 already 100%, so the baseline is 3; the description adds value by clarifying the merge-versus-create decision, the 409 AGENT_EXISTS consequence of omitting agent_id, and where a suggested id can come from. It does not add anything about the `id` parameter beyond the schema.

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+effect: 'Counts a discovered trace source's traces under an agent from now on.' This clearly distinguishes it from register_agent (manual) and list_discovered_agents (read), and the title reinforces the same idea.

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?

Explicitly branches on the primary decision: 'Without agent_id, a new agent named after the source is created' versus 'With agent_id (e.g. a suggested_agent_id), the source merges into that agent,' and it names the alternative source of a suggested id. It further covers re-adoption cases and their outcomes, leaving little to inference.

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