Skip to main content
Glama

ensure_link

Create a directed link between an experiment and an item idempotently. Use dry_run to preview changes before writing.

Instructions

Idempotently create a directed link between an experiment and an item. WRITE OPERATION when dry_run=false — requires the link write scope. dry_run=true (default) only reports what would happen. Returns result: linked | already_linked | would_link (verified after writing).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
to_idYes
dry_runNo
from_idYes
to_typeYes
trace_idNo
from_typeYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it declares the write operation, the required link write scope, the default-safe dry_run behavior, and the post-write verification. It still omits error/failure behavior and what happens with invalid or conflicting links, keeping it short of a 5.

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?

Three tight sentences, front-loaded with the core action and scope, then the write-mode warning, then the return contract. No filler.

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?

An output schema exists, so return values need not be spelled out, yet the description usefully names the result values anyway. For a mutation tool with zero annotations it covers safety and write scope well; the remaining gap is the undocumented input parameters.

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

Parameters2/5

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

Schema description coverage is 0% across 6 parameters, so the description must compensate but only documents dry_run. from_type, from_id, to_type, to_id, and trace_id are unexplained, and the 'experiment and item' phrasing arguably conflicts with the generic type parameters.

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?

States a specific verb and resource: 'idempotently create a directed link between an experiment and an item', with the idempotency and directedness qualifiers that distinguish it from a plain link-creation. It does not explicitly name siblings like ensure_link_by_query or bulk_ensure_links, so differentiation is implied rather than stated. The 'experiment and item' framing is slightly narrower than the generic from_type/to_type schema suggests.

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?

It clearly explains the dry_run=false vs dry_run=true modes and their defaults, which is useful invocation guidance. However, it never says when to reach for this tool versus the obvious siblings (bulk_ensure_links, ensure_link_by_query), so tool selection is left to inference.

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