Skip to main content
Glama

link

Link tasks to define blocking, parent-child, or dependency relationships. Prevents cycles and duplicate links while tracking lineage and idempotency.

Instructions

Links two tasks and files link_added in both cases.

kind is the role of key: blocks means key blocks other, and the card of other shows the link as blocked_by. A link is stored once: the same link from the other side is refused with link_exists, like a repeat. A link closing a cycle is refused with link_cycle_detected, a link of a task to itself with link_self_not_allowed.

parent and child set the hierarchy, shown by get_task in the fields parent and children rather than in links. A task has one parent: a second one is refused with task_has_parent, the current parent named in details.parent.

An open blocker raises the blocked feature of the blocked task and keeps it out of in_progress with task_blocked.

A closed task (done, cancelled) accepts only relates, the link to a continuation grown from it; parent and blocks on it are refused with task_closed. Only a link shows the lineage on the cards of both tasks: a key mentioned in an entry body or in refs does not.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYesTask key `PROJECT-N`, case-insensitive; a previous key of a moved task addresses it as well. An unknown key is refused with `task_not_found`
kindYesRole of the task `key` toward the task `other`: `link(key='TRK-1', kind='blocks', other='TRK-7')` means TRK-1 blocks TRK-7, and the card of TRK-7 shows the same link as `blocked_by`
otherYesKey of the task on the other side of the link
idempotency_keyNoRetry key chosen by the caller, e.g. a UUID. A repeat with the same key and the same arguments returns the first result and creates nothing; the same key with other arguments is refused with `idempotency_key_reused`. A key is bound to the caller's token and kept for 24 hours

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYes
entryYesNumber of the `link_added` or `link_removed` entry in the case of `key`
other_entryYesNumber of the same entry in the case of `other`

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed20 schema fields changedv0.5.2
    • removedInput schema / $defs
      Removed value: -{
      -  "LinkKind": {
      -    "description": "Вид связи. Перечислены обе стороны каждой пары: клиент адресует любую из них.",
      -    "enum": [
      -      "parent",
      -      "child",
      -      "blocks",
      -      "blocked_by",
      -      "relates"
      -    ],
      -    "title": "LinkKind",
      -    "type": "string"
      -  }
      -}
    • changedInput schema / properties / idempotency_key / description
      Previous value: -"Ключ повтора, который ты придумываешь сам (обычно UUID). Повтор вызова с тем же ключом и теми же аргументами отвечает первым результатом и второго объекта не заводит; тот же ключ с другими аргументами отклоняется. Ключ живёт в паре с твоим токеном и помнится 24 часа"New value: +"Retry key chosen by the caller, e.g. a UUID. A repeat with the same key and the same arguments returns the first result and creates nothing; the same key with other arguments is refused with `idempotency_key_reused`. A key is bound to the caller's token and kept for 24 hours"
    • changedInput schema / properties / key / description
      Previous value: -"Ключ задачи, например `TRK-42`. Регистр не важен"New value: +"Task key `PROJECT-N`, case-insensitive; a previous key of a moved task addresses it as well. An unknown key is refused with `task_not_found`"
    • removedInput schema / properties / kind / $ref
      Removed value: -"#/$defs/LinkKind"
    • changedInput schema / properties / kind / description
      Previous value: -"Кем приходится задача из `key` задаче из `other`, а не наоборот: `link(key='TRK-1', kind='blocks', other='TRK-7')` — это «TRK-1 блокирует TRK-7». В карточке TRK-7 та же связь показана как `blocked_by TRK-1`"New value: +"Role of the task `key` toward the task `other`: `link(key='TRK-1', kind='blocks', other='TRK-7')` means TRK-1 blocks TRK-7, and the card of TRK-7 shows the same link as `blocked_by`"
    • addedInput schema / properties / kind / enum
      Added value: +[
      +  "parent",
      +  "child",
      +  "blocks",
      +  "blocked_by",
      +  "relates"
      +]
    • removedInput schema / properties / kind / examples
      Removed value: -[
      -  "blocked_by"
      -]
    • addedInput schema / properties / kind / type
      Added value: +"string"
    • changedInput schema / properties / other / description
      Previous value: -"Ключ задачи на другой стороне связи"New value: +"Key of the task on the other side of the link"
    • removedOutput schema / $defs
      Removed value: -{
      -  "AuthorKind": {
      -    "description": "Кто именно сделал действие.\n\n`tracker` — сам трекер: этим родом подписаны служебные записи дела и строки,\nзаведённые командой первичной инициализации. У него нет подписи, потому что\nназывать себя по имени ему незачем: трекер в установке один.",
      -    "enum": [
      -      "agent",
      -      "human",
      -      "tracker"
      -    ],
      -    "title": "AuthorKind",
      -    "type": "string"
      -  },
      -  "AuthorView": {
      -    "description": "Кто сделал действие: род и подпись. У самого трекера подписи нет.",
      -    "properties": {
      -      "kind": {
      -        "$ref": "#/$defs/AuthorKind"
      -      },
      -      "signature": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "title": "Signature"
      -      }
      -    },
      -    "required": [
      -      "kind",
      -      "signature"
      -    ],
      -    "title": "AuthorView",
      -    "type": "object"
      -  },
      -  "LinkKind": {
      -    "description": "Вид связи. Перечислены обе стороны каждой пары: клиент адресует любую из них.",
      -    "enum": [
      -      "parent",
      -      "child",
      -      "blocks",
      -      "blocked_by",
      -      "relates"
      -    ],
      -    "title": "LinkKind",
      -    "type": "string"
      -  },
      -  "LinkOtherView": {
      -    "description": "Задача на другом конце связи.",
      -    "properties": {
      -      "key": {
      -        "title": "Key",
      -        "type": "string"
      -      },
      -      "status": {
      -        "$ref": "#/$defs/TaskStatus"
      -      },
      -      "title": {
      -        "title": "Title",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "key",
      -      "title",
      -      "status"
      -    ],
      -    "title": "LinkOtherView",
      -    "type": "object"
      -  },
      -  "TaskStatus": {
      -    "description": "Зашитый список статусов (`CONCEPT.md`, 3.3).",
      -    "enum": [
      -      "backlog",
      -      "open",
      -      "in_progress",
      -      "waiting",
      -      "done",
      -      "cancelled"
      -    ],
      -    "title": "TaskStatus",
      -    "type": "string"
      -  }
      -}
    • changedOutput schema / description
      Previous value: -"Связь со стороны своей задачи: вид назван ролью **этой** задачи."New value: +"Entries filed by `link` or `unlink` on both sides of the link."
    • removedOutput schema / properties / author
      Removed value: -{
      -  "$ref": "#/$defs/AuthorView"
      -}
    • removedOutput schema / properties / created_at
      Removed value: -{
      -  "format": "date-time",
      -  "title": "Created At",
      -  "type": "string"
      -}
    • addedOutput schema / properties / entry
      Added value: +{
      +  "description": "Number of the `link_added` or `link_removed` entry in the case of `key`",
      +  "title": "Entry",
      +  "type": "integer"
      +}
    • addedOutput schema / properties / key
      Added value: +{
      +  "title": "Key",
      +  "type": "string"
      +}
    • removedOutput schema / properties / kind
      Removed value: -{
      -  "$ref": "#/$defs/LinkKind"
      -}
    • removedOutput schema / properties / other
      Removed value: -{
      -  "$ref": "#/$defs/LinkOtherView"
      -}
    • addedOutput schema / properties / other_entry
      Added value: +{
      +  "description": "Number of the same entry in the case of `other`",
      +  "title": "Other Entry",
      +  "type": "integer"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "kind",
      -  "other",
      -  "author",
      -  "created_at"
      -]New value: +[
      +  "key",
      +  "entry",
      +  "other_entry"
      +]
    • changedOutput schema / title
      Previous value: -"LinkView"New value: +"LinkFilingView"
  2. First observed

TDQS

A4.7/5.0
Behavior5/5

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

The description substantially exceeds the annotations by disclosing concrete side effects and failure modes: it files `link_added`, refuses duplicate links with `link_exists`, rejects cycles with `link_cycle_detected`, blocks self-links, enforces the single-parent rule with `task_has_parent`, raises the `blocked` feature, and applies `task_closed` restrictions. This gives the agent a strong behavioral model beyond `readOnlyHint: false` and `destructiveHint: false`.

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?

The description is dense but well organized into topical paragraphs: basic link semantics, hierarchy, blocking, closed-task behavior, and lineage. The core purpose is front-loaded in the first sentence, and every paragraph adds necessary behavioral detail without filler or repetition.

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?

Given the tool's complexity, the description fully covers what an agent needs: accepted kinds, directional semantics, side effects, error conditions, hierarchical constraints, blocker behavior, and closed-task limitations. An output schema exists, so the lack of explicit return-format detail is not a gap.

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?

The schema already covers all parameters with high detail, so the baseline is 3. The description adds meaningful semantics by explaining the directional meaning of `kind`, how `parent`/`child` are represented in `get_task`, and how idempotency interacts with repeated calls. It does not add much about the `other` parameter, but the schema already defines it clearly.

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?

The description opens with a specific verb and resource: 'Links two tasks', and immediately distinguishes the operation from its inverse sibling `unlink` by explaining that a link is stored once and the same link from the other side is refused. It also enumerates the distinct link kinds, making the tool's purpose unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives contextual guidance on when each `kind` is appropriate, especially for closed tasks ('accepts only `relates`') and for hierarchy links (`parent`/`child`). It also clarifies that only a real link shows lineage, not a key mentioned in an entry body or `refs`, which helps agents choose this tool over other ways of referencing tasks. It does not explicitly name alternatives like `unlink`, but the conditions are clear enough.

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