Skip to main content
Glama

add_relations

Idempotent

Batch-create up to 50 ontology relations in one call, each validated independently with idempotent handling and detailed per-row errors.

Instructions

Batch-add multiple relations in one call — same per-row shape as add_relation. Use after analyze_repo_structure or another review flow when the agent has K semantic edges accepted by the user — replaces K×add_relation round-trips. Inferred module edges are not accepted merely because imports exist; review exact evidence and include the required nonblank why for every new depends_on. Each row is processed independently and idempotently: existing edges return {ok: true, alreadyExists: true}; missing source/target slugs / unknown type / non-object row shape / unknown row fields surface as {ok: false, error} with a relations[n] row label and structured rowName; unknown type rows include a closest-value hint with structured valueName / receivedValue / suggestion / allowedValues; single unknown-field rows include receivedField plus one-row unknownFields; multi unknown-field rows report every unknown field with nearest hints, allowedFields, receivedFields, and Received fields: .... relations[] order in the response matches the input. Cap = 50 per call. NO atomic rollback — for all-or-nothing semantics use single add_relation calls. Tip: avoid expected_mtime in batch when multiple rows share the same from slug — the first row mutates that file so the second would see a stale mtime. Invalid-only batches return no row-level changed / alreadyExists write metadata and no top-level postWriteMaintenance. When at least one row changes the vault, the response includes one compact postWriteMaintenance (maintenance_plan) with count-safe byPhase / bySeverity / byKind queue buckets, action score, executable proposedAction, and current-page nextExecutableAction / nextReviewAction pointers for the final graph.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
relationsYesArray of relation specs (max 50). Each row uses the same shape as `add_relation` input.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
relationsYes
postWriteMaintenanceNoCompact maintenance_plan summary for post-write follow-up. Bucket maps describe the remaining queue after the write.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv1.3.0
    • changedOutput schema / properties / postWriteMaintenance / properties / actions / items / properties / kind / enum
      Previous value: -[
      -  "inspect_compile_issue",
      -  "break_dependency_cycle",
      -  "canonicalize_graph_arrays",
      -  "resolve_dangling_reference",
      -  "add_missing_relation",
      -  "materialize_external_element",
      -  "unassigned_node",
      -  "empty_domain",
      -  "separate_evidence_from_concept",
      -  "fold_bulk_siblings",
      -  "retire_unearned_node",
      -  "capability_without_evidence",
      -  "rejudge_summary_membership"
      -]New value: +[
      +  "inspect_compile_issue",
      +  "break_dependency_cycle",
      +  "canonicalize_graph_arrays",
      +  "resolve_dangling_reference",
      +  "add_missing_relation",
      +  "materialize_external_element",
      +  "unassigned_node",
      +  "empty_domain",
      +  "separate_evidence_from_concept",
      +  "fold_bulk_siblings",
      +  "retire_unearned_node",
      +  "capability_without_evidence",
      +  "rejudge_summary_membership",
      +  "definition_missing",
      +  "boundary_missing",
      +  "epistemic_exclusion",
      +  "folder_only_evidence",
      +  "slug_outside_kind_folder",
      +  "uncertainty_missing",
      +  "retire_starter_example"
      +]
    • changedOutput schema / properties / postWriteMaintenance / properties / filters / properties / kinds / items / enum
      Previous value: -[
      -  "inspect_compile_issue",
      -  "break_dependency_cycle",
      -  "canonicalize_graph_arrays",
      -  "resolve_dangling_reference",
      -  "add_missing_relation",
      -  "materialize_external_element",
      -  "unassigned_node",
      -  "empty_domain",
      -  "separate_evidence_from_concept",
      -  "fold_bulk_siblings",
      -  "retire_unearned_node",
      -  "capability_without_evidence",
      -  "rejudge_summary_membership"
      -]New value: +[
      +  "inspect_compile_issue",
      +  "break_dependency_cycle",
      +  "canonicalize_graph_arrays",
      +  "resolve_dangling_reference",
      +  "add_missing_relation",
      +  "materialize_external_element",
      +  "unassigned_node",
      +  "empty_domain",
      +  "separate_evidence_from_concept",
      +  "fold_bulk_siblings",
      +  "retire_unearned_node",
      +  "capability_without_evidence",
      +  "rejudge_summary_membership",
      +  "definition_missing",
      +  "boundary_missing",
      +  "epistemic_exclusion",
      +  "folder_only_evidence",
      +  "slug_outside_kind_folder",
      +  "uncertainty_missing",
      +  "retire_starter_example"
      +]
    • changedOutput schema / properties / postWriteMaintenance / properties / nextExecutableAction / properties / kind / enum
      Previous value: -[
      -  "inspect_compile_issue",
      -  "break_dependency_cycle",
      -  "canonicalize_graph_arrays",
      -  "resolve_dangling_reference",
      -  "add_missing_relation",
      -  "materialize_external_element",
      -  "unassigned_node",
      -  "empty_domain",
      -  "separate_evidence_from_concept",
      -  "fold_bulk_siblings",
      -  "retire_unearned_node",
      -  "capability_without_evidence",
      -  "rejudge_summary_membership"
      -]New value: +[
      +  "inspect_compile_issue",
      +  "break_dependency_cycle",
      +  "canonicalize_graph_arrays",
      +  "resolve_dangling_reference",
      +  "add_missing_relation",
      +  "materialize_external_element",
      +  "unassigned_node",
      +  "empty_domain",
      +  "separate_evidence_from_concept",
      +  "fold_bulk_siblings",
      +  "retire_unearned_node",
      +  "capability_without_evidence",
      +  "rejudge_summary_membership",
      +  "definition_missing",
      +  "boundary_missing",
      +  "epistemic_exclusion",
      +  "folder_only_evidence",
      +  "slug_outside_kind_folder",
      +  "uncertainty_missing",
      +  "retire_starter_example"
      +]
    • changedOutput schema / properties / postWriteMaintenance / properties / nextReviewAction / properties / kind / enum
      Previous value: -[
      -  "inspect_compile_issue",
      -  "break_dependency_cycle",
      -  "canonicalize_graph_arrays",
      -  "resolve_dangling_reference",
      -  "add_missing_relation",
      -  "materialize_external_element",
      -  "unassigned_node",
      -  "empty_domain",
      -  "separate_evidence_from_concept",
      -  "fold_bulk_siblings",
      -  "retire_unearned_node",
      -  "capability_without_evidence",
      -  "rejudge_summary_membership"
      -]New value: +[
      +  "inspect_compile_issue",
      +  "break_dependency_cycle",
      +  "canonicalize_graph_arrays",
      +  "resolve_dangling_reference",
      +  "add_missing_relation",
      +  "materialize_external_element",
      +  "unassigned_node",
      +  "empty_domain",
      +  "separate_evidence_from_concept",
      +  "fold_bulk_siblings",
      +  "retire_unearned_node",
      +  "capability_without_evidence",
      +  "rejudge_summary_membership",
      +  "definition_missing",
      +  "boundary_missing",
      +  "epistemic_exclusion",
      +  "folder_only_evidence",
      +  "slug_outside_kind_folder",
      +  "uncertainty_missing",
      +  "retire_starter_example"
      +]
  2. Changed8 schema fields changedv1.2.5
    • addedOutput schema / properties / postWriteMaintenance / properties / actions / items / allOf
      Added value: +[
      +  {
      +    "if": {
      +      "properties": {
      +        "executable": {
      +          "const": true
      +        }
      +      },
      +      "required": [
      +        "executable"
      +      ]
      +    },
      +    "then": {
      +      "properties": {
      +        "proposedAction": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "args": {
      +              "oneOf": [
      +                {
      +                  "additionalProperties": false,
      +                  "properties": {
      +                    "kind": {
      +                      "enum": [
      +                        "project",
      +                        "domain",
      +                        "capability",
      +                        "element",
      +                        "document",
      +                        "vault-readme"
      +                      ],
      +                      "minLength": 1,
      +                      "pattern": "^(?!\\s)(?!.*\\s$)(?!.*\\u0000).+$",
      +                      "type": "string"
      +                    },
      +                    "slug": {
      +                      "minLength": 1,
      +                      "pattern": "^(?!\\s)(?!.*\\s$)(?!.*\\u0000).+$",
      +                      "type": "string"
      +                    },
      +                    "title": {
      +                      "minLength": 1,
      +                      "pattern": "^(?!\\s)(?!.*\\s$)(?!.*\\u0000).+$",
      +                      "type": "string"
      +                    }
      +                  },
      +                  "required": [
      +                    "slug",
      +                    "kind",
      +                    "title"
      +                  ],
      +                  "type": "object"
      +                },
      +                {
      +                  "additionalProperties": false,
      +                  "properties": {
      +                    "from": {
      +                      "minLength": 1,
      +                      "pattern": "^(?!\\s)(?!.*\\s$)(?!.*\\u0000).+$",
      +                      "type": "string"
      +                    },
      +                    "to": {
      +                      "minLength": 1,
      +                      "pattern": "^(?!\\s)(?!.*\\s$)(?!.*\\u0000).+$",
      +                      "type": "string"
      +                    },
      +                    "type": {
      +                      "enum": [
      +                        "depends_on",
      +                        "relates",
      +                        "contains",
      +                        "describes",
      +                        "domains",
      +                        "capabilities",
      +                        "elements",
      +                        "domain"
      +                      ],
      +                      "minLength": 1,
      +                      "pattern": "^(?!\\s)(?!.*\\s$)(?!.*\\u0000).+$",
      +                      "type": "string"
      +                    },
      +                    "why": {
      +                      "description": "One-line rationale for this relation (\"A leans on B because ...\"). Stored in the SAME frontmatter write as the ref (relation_notes map) — write it whenever you know the reason; a graph edge without a why is a mind-map line, not an ontology claim.",
      +                      "maxLength": 300,
      +                      "type": "string"
      +                    }
      +                  },
      +                  "required": [
      +                    "from",
      +                    "to",
      +                    "type"
      +                  ],
      +                  "type": "object"
      +                },
      +                {
      +                  "additionalProperties": false,
      +                  "properties": {
      +                    "expected_mtime": {
      +                      "minimum": 0,
      +                      "type": "number"
      +                    },
      +                    "frontmatter": {
      +                      "additionalProperties": false,
      +                      "properties": {
      +                        "broader": {
      +                          "items": {
      +                            "minLength": 1,
      +                            "pattern": "^(?!\\s)(?!.*\\s$)(?!.*\\u0000).+$",
      +                            "type": "string"
      +                          },
      +                          "maxItems": 500,
      +                          "type": "array"
      +                        },
      +                        "capabilities": {
      +                          "items": {
      +                            "minLength": 1,
      +                            "pattern": "^(?!\\s)(?!.*\\s$)(?!.*\\u0000).+$",
      +                            "type": "string"
      +                          },
      +                          "maxItems": 500,
      +                          "type": "array"
      +                        },
      +                        "contains": {
      +                          "items": {
      +                            "minLength": 1,
      +                            "pattern": "^(?!\\s)(?!.*\\s$)(?!.*\\u0000).+$",
      +                            "type": "string"
      +                          },
      +                          "maxItems": 500,
      +                          "type": "array"
      +                        },
      +                        "dependencies": {
      +                          "items": {
      +                            "minLength": 1,
      +                            "pattern": "^(?!\\s)(?!.*\\s$)(?!.*\\u0000).+$",
      +                            "type": "string"
      +                          },
      +                          "maxItems": 500,
      +                          "type": "array"
      +                        },
      +                        "depends_on": {
      +                          "items": {
      +                            "minLength": 1,
      +                            "pattern": "^(?!\\s)(?!.*\\s$)(?!.*\\u0000).+$",
      +                            "type": "string"
      +                          },
      +                          "maxItems": 500,
      +                          "type": "array"
      +                        },
      +                        "describes": {
      +                          "items": {
      +                            "minLength": 1,
      +                            "pattern": "^(?!\\s)(?!.*\\s$)(?!.*\\u0000).+$",
      +                            "type": "string"
      +                          },
      +                          "maxItems": 500,
      +                          "type": "array"
      +                        },
      +                        "domains": {
      +                          "items": {
      +                            "minLength": 1,
      +                            "pattern": "^(?!\\s)(?!.*\\s$)(?!.*\\u0000).+$",
      +                            "type": "string"
      +                          },
      +                          "maxItems": 500,
      +                          "type": "array"
      +                        },
      +                        "elements": {
      +                          "items": {
      +                            "minLength": 1,
      +                            "pattern": "^(?!\\s)(?!.*\\s$)(?!.*\\u0000).+$",
      +                            "type": "string"
      +                          },
      +                          "maxItems": 500,
      +                          "type": "array"
      +                        },
      +                        "relates": {
      +                          "items": {
      +                            "minLength": 1,
      +                            "pattern": "^(?!\\s)(?!.*\\s$)(?!.*\\u0000).+$",
      +                            "type": "string"
      +                          },
      +                          "maxItems": 500,
      +                          "type": "array"
      +                        }
      +                      },
      +                      "type": "object"
      +                    },
      +                    "slug": {
      +                      "minLength": 1,
      +                      "pattern": "^(?!\\s)(?!.*\\s$)(?!.*\\u0000).+$",
      +                      "type": "string"
      +                    }
      +                  },
      +                  "required": [
      +                    "slug",
      +                    "frontmatter",
      +                    "expected_mtime"
      +                  ],
      +                  "type": "object"
      +                }
      +              ]
      +            },
      +            "tool": {
      +              "enum": [
      +                "add_concept",
      +                "add_relation",
      +                "patch_concept"
      +              ],
      +              "minLength": 1,
      +              "pattern": "^(?!\\s)(?!.*\\s$)(?!.*\\u0000).+$",
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "tool",
      +            "args"
      +          ],
      +          "type": "object"
      +        }
      +      },
      +      "required": [
      +        "proposedAction"
      +      ]
      +    }
      +  }
      +]
    • changedOutput schema / properties / postWriteMaintenance / properties / actions / items / required
      Previous value: -[
      -  "id",
      -  "phase",
      -  "kind",
      -  "severity",
      -  "score",
      -  "executable",
      -  "reason",
      -  "proposedAction"
      -]New value: +[
      +  "id",
      +  "phase",
      +  "kind",
      +  "severity",
      +  "score",
      +  "executable",
      +  "reason"
      +]
    • addedOutput schema / properties / postWriteMaintenance / properties / nextExecutableAction / allOf
      Added value: +[
      +  {
      +    "if": {
      +      "properties": {
      +        "executable": {
      +          "const": true
      +        }
      +      },
      +      "required": [
      +        "executable"
      +      ]
      +    },
      +    "then": {
      +      "properties": {
      +        "proposedAction": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "args": {
      +              "oneOf": [
      +                {
      +                  "additionalProperties": false,
      +                  "properties": {
      +                    "kind": {
      +                      "enum": [
      +                        "project",
      +                        "domain",
      +                        "capability",
      +                        "element",
      +                        "document",
      +                        "vault-readme"
      +                      ],
      +                      "minLength": 1,
      +                      "pattern": "^(?!\\s)(?!.*\\s$)(?!.*\\u0000).+$",
      +                      "type": "string"
      +                    },
      +                    "slug": {
      +                      "minLength": 1,
      +                      "pattern": "^(?!\\s)(?!.*\\s$)(?!.*\\u0000).+$",
      +                      "type": "string"
      +                    },
      +                    "title": {
      +                      "minLength": 1,
      +                      "pattern": "^(?!\\s)(?!.*\\s$)(?!.*\\u0000).+$",
      +                      "type": "string"
      +                    }
      +                  },
      +                  "required": [
      +                    "slug",
      +                    "kind",
      +                    "title"
      +                  ],
      +                  "type": "object"
      +                },
      +                {
      +                  "additionalProperties": false,
      +                  "properties": {
      +                    "from": {
      +                      "minLength": 1,
      +                      "pattern": "^(?!\\s)(?!.*\\s$)(?!.*\\u0000).+$",
      +                      "type": "string"
      +                    },
      +                    "to": {
      +                      "minLength": 1,
      +                      "pattern": "^(?!\\s)(?!.*\\s$)(?!.*\\u0000).+$",
      +                      "type": "string"
      +                    },
      +                    "type": {
      +                      "enum": [
      +                        "depends_on",
      +                        "relates",
      +                        "contains",
      +                        "describes",
      +                        "domains",
      +                        "capabilities",
      +                        "elements",
      +                        "domain"
      +                      ],
      +                      "minLength": 1,
      +                      "pattern": "^(?!\\s)(?!.*\\s$)(?!.*\\u0000).+$",
      +                      "type": "string"
      +                    },
      +                    "why": {
      +                      "description": "One-line rationale for this relation (\"A leans on B because ...\"). Stored in the SAME frontmatter write as the ref (relation_notes map) — write it whenever you know the reason; a graph edge without a why is a mind-map line, not an ontology claim.",
      +                      "maxLength": 300,
      +                      "type": "string"
      +                    }
      +                  },
      +                  "required": [
      +                    "from",
      +                    "to",
      +                    "type"
      +                  ],
      +                  "type": "object"
      +                },
      +                {
      +                  "additionalProperties": false,
      +                  "properties": {
      +                    "expected_mtime": {
      +                      "minimum": 0,
      +                      "type": "number"
      +                    },
      +                    "frontmatter": {
      +                      "additionalProperties": false,
      +                      "properties": {
      +                        "broader": {
      +                          "items": {
      +                            "minLength": 1,
      +                            "pattern": "^(?!\\s)(?!.*\\s$)(?!.*\\u0000).+$",
      +                            "type": "string"
      +                          },
      +                          "maxItems": 500,
      +                          "type": "array"
      +                        },
      +                        "capabilities": {
      +                          "items": {
      +                            "minLength": 1,
      +                            "pattern": "^(?!\\s)(?!.*\\s$)(?!.*\\u0000).+$",
      +                            "type": "string"
      +                          },
      +                          "maxItems": 500,
      +                          "type": "array"
      +                        },
      +                        "contains": {
      +                          "items": {
      +                            "minLength": 1,
      +                            "pattern": "^(?!\\s)(?!.*\\s$)(?!.*\\u0000).+$",
      +                            "type": "string"
      +                          },
      +                          "maxItems": 500,
      +                          "type": "array"
      +                        },
      +                        "dependencies": {
      +                          "items": {
      +                            "minLength": 1,
      +                            "pattern": "^(?!\\s)(?!.*\\s$)(?!.*\\u0000).+$",
      +                            "type": "string"
      +                          },
      +                          "maxItems": 500,
      +                          "type": "array"
      +                        },
      +                        "depends_on": {
      +                          "items": {
      +                            "minLength": 1,
      +                            "pattern": "^(?!\\s)(?!.*\\s$)(?!.*\\u0000).+$",
      +                            "type": "string"
      +                          },
      +                          "maxItems": 500,
      +                          "type": "array"
      +                        },
      +                        "describes": {
      +                          "items": {
      +                            "minLength": 1,
      +                            "pattern": "^(?!\\s)(?!.*\\s$)(?!.*\\u0000).+$",
      +                            "type": "string"
      +                          },
      +                          "maxItems": 500,
      +                          "type": "array"
      +                        },
      +                        "domains": {
      +                          "items": {
      +                            "minLength": 1,
      +                            "pattern": "^(?!\\s)(?!.*\\s$)(?!.*\\u0000).+$",
      +                            "type": "string"
      +                          },
      +                          "maxItems": 500,
      +                          "type": "array"
      +                        },
      +                        "elements": {
      +                          "items": {
      +                            "minLength": 1,
      +                            "pattern": "^(?!\\s)(?!.*\\s$)(?!.*\\u0000).+$",
      +                            "type": "string"
      +                          },
      +                          "maxItems": 500,
      +                          "type": "array"
      +                        },
      +                        "relates": {
      +                          "items": {
      +                            "minLength": 1,
      +                            "pattern": "^(?!\\s)(?!.*\\s$)(?!.*\\u0000).+$",
      +                            "type": "string"
      +                          },
      +                          "maxItems": 500,
      +                          "type": "array"
      +                        }
      +                      },
      +                      "type": "object"
      +                    },
      +                    "slug": {
      +                      "minLength": 1,
      +                      "pattern": "^(?!\\s)(?!.*\\s$)(?!.*\\u0000).+$",
      +                      "type": "string"
      +                    }
      +                  },
      +                  "required": [
      +                    "slug",
      +                    "frontmatter",
      +                    "expected_mtime"
      +                  ],
      +                  "type": "object"
      +                }
      +              ]
      +            },
      +            "tool": {
      +              "enum": [
      +                "add_concept",
      +                "add_relation",
      +                "patch_concept"
      +              ],
      +              "minLength": 1,
      +              "pattern": "^(?!\\s)(?!.*\\s$)(?!.*\\u0000).+$",
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "tool",
      +            "args"
      +          ],
      +          "type": "object"
      +        }
      +      },
      +      "required": [
      +        "proposedAction"
      +      ]
      +    }
      +  }
      +]
    • changedOutput schema / properties / postWriteMaintenance / properties / nextExecutableAction / required
      Previous value: -[
      -  "id",
      -  "phase",
      -  "kind",
      -  "severity",
      -  "score",
      -  "executable",
      -  "reason",
      -  "proposedAction"
      -]New value: +[
      +  "id",
      +  "phase",
      +  "kind",
      +  "severity",
      +  "score",
      +  "executable",
      +  "reason"
      +]
    • addedOutput schema / properties / postWriteMaintenance / properties / nextReviewAction / allOf
      Added value: +[
      +  {
      +    "if": {
      +      "properties": {
      +        "executable": {
      +          "const": true
      +        }
      +      },
      +      "required": [
      +        "executable"
      +      ]
      +    },
      +    "then": {
      +      "properties": {
      +        "proposedAction": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "args": {
      +              "oneOf": [
      +                {
      +                  "additionalProperties": false,
      +                  "properties": {
      +                    "kind": {
      +                      "enum": [
      +                        "project",
      +                        "domain",
      +                        "capability",
      +                        "element",
      +                        "document",
      +                        "vault-readme"
      +                      ],
      +                      "minLength": 1,
      +                      "pattern": "^(?!\\s)(?!.*\\s$)(?!.*\\u0000).+$",
      +                      "type": "string"
      +                    },
      +                    "slug": {
      +                      "minLength": 1,
      +                      "pattern": "^(?!\\s)(?!.*\\s$)(?!.*\\u0000).+$",
      +                      "type": "string"
      +                    },
      +                    "title": {
      +                      "minLength": 1,
      +                      "pattern": "^(?!\\s)(?!.*\\s$)(?!.*\\u0000).+$",
      +                      "type": "string"
      +                    }
      +                  },
      +                  "required": [
      +                    "slug",
      +                    "kind",
      +                    "title"
      +                  ],
      +                  "type": "object"
      +                },
      +                {
      +                  "additionalProperties": false,
      +                  "properties": {
      +                    "from": {
      +                      "minLength": 1,
      +                      "pattern": "^(?!\\s)(?!.*\\s$)(?!.*\\u0000).+$",
      +                      "type": "string"
      +                    },
      +                    "to": {
      +                      "minLength": 1,
      +                      "pattern": "^(?!\\s)(?!.*\\s$)(?!.*\\u0000).+$",
      +                      "type": "string"
      +                    },
      +                    "type": {
      +                      "enum": [
      +                        "depends_on",
      +                        "relates",
      +                        "contains",
      +                        "describes",
      +                        "domains",
      +                        "capabilities",
      +                        "elements",
      +                        "domain"
      +                      ],
      +                      "minLength": 1,
      +                      "pattern": "^(?!\\s)(?!.*\\s$)(?!.*\\u0000).+$",
      +                      "type": "string"
      +                    },
      +                    "why": {
      +                      "description": "One-line rationale for this relation (\"A leans on B because ...\"). Stored in the SAME frontmatter write as the ref (relation_notes map) — write it whenever you know the reason; a graph edge without a why is a mind-map line, not an ontology claim.",
      +                      "maxLength": 300,
      +                      "type": "string"
      +                    }
      +                  },
      +                  "required": [
      +                    "from",
      +                    "to",
      +                    "type"
      +                  ],
      +                  "type": "object"
      +                },
      +                {
      +                  "additionalProperties": false,
      +                  "properties": {
      +                    "expected_mtime": {
      +                      "minimum": 0,
      +                      "type": "number"
      +                    },
      +                    "frontmatter": {
      +                      "additionalProperties": false,
      +                      "properties": {
      +                        "broader": {
      +                          "items": {
      +                            "minLength": 1,
      +                            "pattern": "^(?!\\s)(?!.*\\s$)(?!.*\\u0000).+$",
      +                            "type": "string"
      +                          },
      +                          "maxItems": 500,
      +                          "type": "array"
      +                        },
      +                        "capabilities": {
      +                          "items": {
      +                            "minLength": 1,
      +                            "pattern": "^(?!\\s)(?!.*\\s$)(?!.*\\u0000).+$",
      +                            "type": "string"
      +                          },
      +                          "maxItems": 500,
      +                          "type": "array"
      +                        },
      +                        "contains": {
      +                          "items": {
      +                            "minLength": 1,
      +                            "pattern": "^(?!\\s)(?!.*\\s$)(?!.*\\u0000).+$",
      +                            "type": "string"
      +                          },
      +                          "maxItems": 500,
      +                          "type": "array"
      +                        },
      +                        "dependencies": {
      +                          "items": {
      +                            "minLength": 1,
      +                            "pattern": "^(?!\\s)(?!.*\\s$)(?!.*\\u0000).+$",
      +                            "type": "string"
      +                          },
      +                          "maxItems": 500,
      +                          "type": "array"
      +                        },
      +                        "depends_on": {
      +                          "items": {
      +                            "minLength": 1,
      +                            "pattern": "^(?!\\s)(?!.*\\s$)(?!.*\\u0000).+$",
      +                            "type": "string"
      +                          },
      +                          "maxItems": 500,
      +                          "type": "array"
      +                        },
      +                        "describes": {
      +                          "items": {
      +                            "minLength": 1,
      +                            "pattern": "^(?!\\s)(?!.*\\s$)(?!.*\\u0000).+$",
      +                            "type": "string"
      +                          },
      +                          "maxItems": 500,
      +                          "type": "array"
      +                        },
      +                        "domains": {
      +                          "items": {
      +                            "minLength": 1,
      +                            "pattern": "^(?!\\s)(?!.*\\s$)(?!.*\\u0000).+$",
      +                            "type": "string"
      +                          },
      +                          "maxItems": 500,
      +                          "type": "array"
      +                        },
      +                        "elements": {
      +                          "items": {
      +                            "minLength": 1,
      +                            "pattern": "^(?!\\s)(?!.*\\s$)(?!.*\\u0000).+$",
      +                            "type": "string"
      +                          },
      +                          "maxItems": 500,
      +                          "type": "array"
      +                        },
      +                        "relates": {
      +                          "items": {
      +                            "minLength": 1,
      +                            "pattern": "^(?!\\s)(?!.*\\s$)(?!.*\\u0000).+$",
      +                            "type": "string"
      +                          },
      +                          "maxItems": 500,
      +                          "type": "array"
      +                        }
      +                      },
      +                      "type": "object"
      +                    },
      +                    "slug": {
      +                      "minLength": 1,
      +                      "pattern": "^(?!\\s)(?!.*\\s$)(?!.*\\u0000).+$",
      +                      "type": "string"
      +                    }
      +                  },
      +                  "required": [
      +                    "slug",
      +                    "frontmatter",
      +                    "expected_mtime"
      +                  ],
      +                  "type": "object"
      +                }
      +              ]
      +            },
      +            "tool": {
      +              "enum": [
      +                "add_concept",
      +                "add_relation",
      +                "patch_concept"
      +              ],
      +              "minLength": 1,
      +              "pattern": "^(?!\\s)(?!.*\\s$)(?!.*\\u0000).+$",
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "tool",
      +            "args"
      +          ],
      +          "type": "object"
      +        }
      +      },
      +      "required": [
      +        "proposedAction"
      +      ]
      +    }
      +  }
      +]
    • changedOutput schema / properties / postWriteMaintenance / properties / nextReviewAction / required
      Previous value: -[
      -  "id",
      -  "phase",
      -  "kind",
      -  "severity",
      -  "score",
      -  "executable",
      -  "reason",
      -  "proposedAction"
      -]New value: +[
      +  "id",
      +  "phase",
      +  "kind",
      +  "severity",
      +  "score",
      +  "executable",
      +  "reason"
      +]
    • addedOutput schema / properties / postWriteMaintenance / properties / summary / properties / capabilitiesWithoutEvidence
      Added value: +{
      +  "minimum": 0,
      +  "type": "integer"
      +}
    • changedOutput schema / properties / postWriteMaintenance / properties / summary / required
      Previous value: -[
      -  "totalActions",
      -  "filteredActions",
      -  "remainingActions",
      -  "executableActions",
      -  "reviewActions",
      -  "compileIssues",
      -  "dependencyCycles",
      -  "canonicalizationActions",
      -  "danglingReferences",
      -  "relationRecommendations",
      -  "externalElementRefs",
      -  "externalElementRefsIgnored",
      -  "unassignedNodes",
      -  "emptyDomains"
      -]New value: +[
      +  "totalActions",
      +  "filteredActions",
      +  "remainingActions",
      +  "executableActions",
      +  "reviewActions",
      +  "compileIssues",
      +  "dependencyCycles",
      +  "canonicalizationActions",
      +  "danglingReferences",
      +  "relationRecommendations",
      +  "externalElementRefs",
      +  "externalElementRefsIgnored",
      +  "unassignedNodes",
      +  "emptyDomains",
      +  "capabilitiesWithoutEvidence"
      +]
  3. First observedv0.13.0

TDQS

A4.9/5.0
Behavior5/5

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

The description goes far beyond the annotations: it discloses non-atomicity, per-row independent/idempotent processing, exact error shapes, the 50-row cap, and the absence/presence of `postWriteMaintenance`. This complements the idempotentHint=true annotation without contradicting any annotation field.

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 description is long, but it is front-loaded with the core capability and use case, and each subsequent clause adds actionable behavioral or error-handling detail rather than filler. It could be trimmed slightly if the output schema already documents the response fields, but the density is justified by the batch operation's complexity.

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 batch mutation tool with one parameter, the description covers input constraints, row-level error semantics, ordering, capacity, rollback behavior, a concurrency trap, and post-write maintenance response structure. Nothing an agent needs to invoke it correctly appears to be missing.

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

Parameters5/5

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

Although the schema already describes `relations` and its fields, the description adds meaningful runtime semantics: the `why` field is required nonblank for new `depends_on` rows, `expected_mtime` can become stale when multiple rows share a `from` slug, and rows are processed independently. This materially improves an agent's ability to construct valid batch payloads.

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: 'Batch-add multiple relations in one call.' It explicitly contrasts with the sibling `add_relation` by noting this replaces K×`add_relation` round-trips, so an agent can clearly distinguish the tool's purpose from the singular variant.

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?

It gives an explicit use-after condition ('Use after `analyze_repo_structure` or another review flow when the agent has K semantic edges accepted by the user') and an explicit alternative ('for all-or-nothing semantics use single `add_relation` calls'). It also warns about `expected_mtime` in specific batch scenarios, which is practical usage guidance.

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