Skip to main content
Glama

Link tasks

link

Connect two Casefile tasks to define dependencies, parent-child hierarchy, or related work, recording the relationship on both task cards.

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.6/5.0
Behavior5/5

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

Annotations only carry the safe/unsafe profile; the description supplies the substantive behavior: duplicate links refused with `link_exists`, cycles with `link_cycle_detected`, self-links with `link_self_not_allowed`, closed-task refusals, and the side effect of raising a task's `blocked` feature and keeping it out of `in_progress`. This is rich, non-redundant disclosure.

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?

The lead sentence is front-loaded with the action and effect, and the following paragraphs are organized by topic (kind roles, hierarchy, blocking, closed tasks). It is dense with error codes but each clause carries distinct information, so little is wasted.

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?

For a link-mutation tool with an output schema already covering return shape, the description covers the edge cases an agent needs: valid kinds, one-parent constraint, cycle/self/closed-task refusals, and side effects on cards and the `blocked` feature. Nothing material is missing.

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% and the `kind` enum is already well documented in the schema, so baseline is 3. The description adds meaning beyond the schema by explaining that `parent`/`child` set hierarchy shown via `get_task` fields rather than `links`, and how the same link renders from the opposite side.

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 concrete verb and resource ('Links two tasks') plus the side effect ('files `link_added` in both cases'). It also clearly separates this from the sibling `unlink` and from hierarchy operations, so the agent knows exactly what this tool does.

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?

Explains the semantics of each `kind` value, the one-parent rule, cycle refusal, and what closed tasks accept, which effectively tells the agent when a link is valid or refused. It never names a competing tool or an explicit 'use X instead' escape hatch (e.g. vs `unlink` or `update_task`), so it stops short of top-tier routing.

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