Skip to main content
Glama

link_items

Idempotent

Link two items with a relation: alternative, complement, upgrade (to_id replaces from_id), duplicate, same_seller. One pair via from_id/to_id/relation, or up to 20 via pairs. Example: from_id, to_id, relation="alternative".

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "link_items"
  }
}

Input Schema

NameRequiredDescriptionDefault
pairsNoPairs to link (bulk)
to_idNoSecond item ID (single pair)
reasonNoWhy, for the change history
from_idNoFirst item ID (single pair)
relationNoRelation (single pair)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changed
    • changedInput schema / properties / from_id / description
      Previous value: -"First item ID (for single pair mode)"New value: +"First item ID (single pair)"
    • changedInput schema / properties / pairs / description
      Previous value: -"Array of pairs to link (for bulk mode)"New value: +"Pairs to link (bulk)"
    • changedInput schema / properties / pairs / items / properties / relation / description
      Previous value: -"Type of relationship"New value: +"Relation"
    • addedInput schema / properties / pairs / maxItems
      Added value: +20
    • changedInput schema / properties / reason / description
      Previous value: -"Why this change was made (shown to user in change history)"New value: +"Why, for the change history"
    • changedInput schema / properties / relation / description
      Previous value: -"Type of relationship (for single pair mode)"New value: +"Relation (single pair)"
    • changedInput schema / properties / to_id / description
      Previous value: -"Second item ID (for single pair mode)"New value: +"Second item ID (single pair)"
  2. First observed

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already declare this is a non-read-only, idempotent, non-destructive, closed-world mutation, so the safety profile is covered. The description adds genuinely useful behavior in the "upgrade" relation semantics, but leaves open what happens to pre-existing links, whether a relation can be overwritten, and what the reason field feeds into (only implied by the schema's "change history" text).

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?

Two compact sentences, front-loaded with the purpose, followed by the mode split and an example. The trailing example largely restates the single-pair mode already described, so it is slightly redundant, but nothing is padded or buried.

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 mutation tool with no output schema, the description covers purpose, the relation vocabulary, directionality for upgrade, and both invocation modes, while annotations carry safety and idempotency. Remaining gaps are edge-case behavior (existing links, partial failure in bulk mode) rather than anything that would block a correct call.

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 information the schema does not express: that the single-pair fields and the bulk pairs array are alternative modes rather than combinable ones, and what "upgrade" directionality means for from_id vs to_id. That is meaningful semantic value beyond the field-level descriptions.

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 ("Link two items with a relation") and enumerates the full relation vocabulary, including the non-obvious semantics of "upgrade (to_id replaces from_id)". Together with the sibling name unlink_items, an agent can tell what this does and what it does not do without opening the schema.

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 description clarifies the two invocation modes (one pair via from_id/to_id/relation, or up to 20 via pairs) and gives a concrete example, which is real guidance on how to call it. It says nothing about when to prefer this over sibling operations such as add_to_collection or unlink_items, or about prerequisites like item existence, so usage context is only implied.

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