Skip to main content
Glama

kb_model

Read-onlyIdempotent

Turn requirement prose into checkable structure without writing the KB: analyze clauses and ambiguity, generate strict claim write sets, or rank predicate plans for reviewed ontology bindings.

Instructions

Turn requirement prose into checkable structure without writing the KB. Use it for one requirement's prose; to plan a whole change request use kb_compile_intent. mode:analyze returns the semantic advisor receipt: the clause ledger, what is grounded, what is ambiguous and suggested modeling (pass clauses for compound prose and optional typed kibi.logic.v1 interpretations). mode:requirement converts one claim (subjectKey, propertyKey, operator, value, or typed logic) into a strict-lane write set and applyPlan. mode:predicates ranks ontology predicate schemas and returns an applicable predicate-fact plan only for reviewed bindings, otherwise an ontology-gap observation. With requirementId, mode:predicates also returns a hash-bound plan (fact write plus requires_predicate link) for kb_apply_plan, whose contradictionAnalysis is the what-if over the current KB; other returned plans apply with kb_upsert, and kb_upsert dryRun with plannedFacts previews a requirement before its facts exist.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "mode": "<mode>",
      "text": "<text>"
    },
    "name": "kb_model"
  }
}

Input Schema

NameRequiredDescriptionDefault
idNoOptional requirement ID used for deterministic draft relationship guidance.
modeYesanalyze (advisor receipt), requirement (strict claim write set) or predicates (ontology predicate plan).
textYesRequired prose requirement text to model. Example: 'Customer data must be retained for 7 years.'
typeNoEntity type context for analysis; only requirements receive deterministic modeling suggestions.
logicNoOptional typed kibi.logic.v1 IR. Kibi validates and canonicalizes it into a rule fact; raw Prolog is rejected.
titleNoOptional requirement title for draft apply plans.
valueNoOptional claim value: string, number, boolean, or a list of strings for a set claim.
sourceNoOptional primary source path used for stable IDs and text refs.
statusNoOptional requirement status for draft suggestions.
clausesNoOptional complete list of atomic clauses; each must be a verbatim fragment of text.
claimKeyNoOptional advisor-issued claim key for the exact proposition represented by logic.
minScoreNoMinimum candidate score. Higher values make ontology-gap fallback more likely. Default: 0.35.
operatorNoOptional claim operator, e.g. eq, gt, lt; sets take eq, includes, subset_of or excludes; matches takes a regex.
schemaIdNoOptional exact reviewed predicate schema ID to use instead of rank order; fails closed if unavailable.
claimTextNoOptional exact proposition text represented by logic; defaults to text.
confidenceNoConfidence of the extracted claim: >= 0.70 yields strict-lane output, lower yields observation-only output.
provenanceNoOptional extracted text reference; falls back to source. Example: '.kb/requirements/customer-retention.md#L1'.
subjectKeyNoOptional extracted semantic claim subjectKey. Example: 'Customer.Data'.
propertyKeyNoOptional extracted semantic claim propertyKey. Example: 'Retention Years'.
sourceFilesNoOptional related source files. The first value is used as the source fallback when source is omitted.
subjectHintNoOptional canonical subject key to use as the first predicate argument. Example: 'editor.annotation'.
polarityHintNoOptional reviewed polarity override when surface negation does not mean predicate denial.
maxCandidatesNoMaximum ranked predicate candidates to return. Default: 5.
requirementIdNoOptional requirement ID the strict write set updates instead of minting a REQ-AUTO id.
workspaceRootNoOptional absolute path of the workspace this call is about, such as your git worktree, when it is not the server's.
interpretationsNoOptional typed kibi.logic.v1 interpretations from the host model; raw Prolog is not accepted.
argumentBindingsNoOptional exact predicate argument values keyed by argument name; required when binding_status is incomplete.
existingLogicClaimsNoExisting requirement logic_claims values; the update merges the new claim key into them.
includeExistingSchemasNoWhether to include the KB's predicate_schema facts beside the built-in predicate catalog. Default: true.

Output Schema

NameRequiredDescriptionDefault
dataYes
errorNo
statusYes
effectsYes
operationYes
diagnosticsYes
nextActionsYes
kibiProtocolYes
resultVersionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed37 schema fields changedv0.1.10
    • changedInput schema / properties / argumentBindings / description
      Previous value: -"Optional exact predicate argument values keyed by a candidate schema's argument_names. Required before applying a candidate whose binding_status is incomplete; Kibi never substitutes guessed values for unbound arguments."New value: +"Optional exact predicate argument values keyed by argument name; required when binding_status is incomplete."
    • changedInput schema / properties / clauses / description
      Previous value: -"Optional complete list of atomic requirement clauses supplied by the caller. Each clause must be a verbatim fragment of text (whitespace may differ); a clause that does not occur in text fails the call with VALIDATION_FAILED naming it. Use this for compound prose so every normative clause receives a stable claim key and independent grounding review."New value: +"Optional complete list of atomic clauses; each must be a verbatim fragment of text."
    • changedInput schema / properties / confidence / description
      Previous value: -"Confidence score for the extracted claim. >= 0.70 yields strict-lane output; lower confidence yields observation-only review output."New value: +"Confidence of the extracted claim: >= 0.70 yields strict-lane output, lower yields observation-only output."
    • changedInput schema / properties / existingLogicClaims / description
      Previous value: -"Existing requirement logic_claims values. The returned requirement update merges the new atomic claim key into this manifest instead of replacing prior claims."New value: +"Existing requirement logic_claims values; the update merges the new claim key into them."
    • changedInput schema / properties / includeExistingSchemas / description
      Previous value: -"Whether to include existing KB fact_kind=predicate_schema facts alongside Kibi's built-in predicate catalog. Default: true."New value: +"Whether to include the KB's predicate_schema facts beside the built-in predicate catalog. Default: true."
    • changedInput schema / properties / interpretations / description
      Previous value: -"Optional host-LLM typed kibi.logic.v1 interpretations. Kibi validates and canonicalizes them; raw Prolog is not accepted."New value: +"Optional typed kibi.logic.v1 interpretations from the host model; raw Prolog is not accepted."
    • removedInput schema / properties / mode / anyOf
      Removed value: -[
      -  {
      -    "const": "analyze",
      -    "type": "string"
      -  },
      -  {
      -    "const": "requirement",
      -    "type": "string"
      -  },
      -  {
      -    "const": "predicates",
      -    "type": "string"
      -  }
      -]
    • addedInput schema / properties / mode / enum
      Added value: +[
      +  "analyze",
      +  "requirement",
      +  "predicates"
      +]
    • addedInput schema / properties / mode / type
      Added value: +"string"
    • removedInput schema / properties / operator / anyOf
      Removed value: -[
      -  {
      -    "const": "eq",
      -    "type": "string"
      -  },
      -  {
      -    "const": "gt",
      -    "type": "string"
      -  },
      -  {
      -    "const": "gte",
      -    "type": "string"
      -  },
      -  {
      -    "const": "lt",
      -    "type": "string"
      -  },
      -  {
      -    "const": "lte",
      -    "type": "string"
      -  },
      -  {
      -    "const": "neq",
      -    "type": "string"
      -  },
      -  {
      -    "const": "bool",
      -    "type": "string"
      -  },
      -  {
      -    "const": "polarity",
      -    "type": "string"
      -  },
      -  {
      -    "const": "matches",
      -    "type": "string"
      -  },
      -  {
      -    "const": "includes",
      -    "type": "string"
      -  },
      -  {
      -    "const": "subset_of",
      -    "type": "string"
      -  },
      -  {
      -    "const": "excludes",
      -    "type": "string"
      -  }
      -]
    • changedInput schema / properties / operator / description
      Previous value: -"Optional extracted semantic claim operator. Use gt/lt for strict bounds ('greater than zero' is gt 0, not gte 0). A set claim takes a list value with eq (exactly these), includes (at least these), subset_of (only these) or excludes (none of these); matches takes a regular expression string. Example: 'eq'."New value: +"Optional claim operator, e.g. eq, gt, lt; sets take eq, includes, subset_of or excludes; matches takes a regex."
    • addedInput schema / properties / operator / enum
      Added value: +[
      +  "eq",
      +  "gt",
      +  "gte",
      +  "lt",
      +  "lte",
      +  "neq",
      +  "bool",
      +  "polarity",
      +  "matches",
      +  "includes",
      +  "subset_of",
      +  "excludes"
      +]
    • addedInput schema / properties / operator / type
      Added value: +"string"
    • removedInput schema / properties / polarityHint / anyOf
      Removed value: -[
      -  {
      -    "const": "assert",
      -    "type": "string"
      -  },
      -  {
      -    "const": "deny",
      -    "type": "string"
      -  }
      -]
    • changedInput schema / properties / polarityHint / description
      Previous value: -"Optional reviewed polarity override for claims whose surface negation does not express predicate denial. Use only after reviewing the selected schema and full claim scope."New value: +"Optional reviewed polarity override when surface negation does not mean predicate denial."
    • addedInput schema / properties / polarityHint / enum
      Added value: +[
      +  "assert",
      +  "deny"
      +]
    • addedInput schema / properties / polarityHint / type
      Added value: +"string"
    • changedInput schema / properties / provenance / description
      Previous value: -"Optional extracted text reference. Falls back to source when omitted. Example: '.kb/requirements/customer-retention.md#L1'."New value: +"Optional extracted text reference; falls back to source. Example: '.kb/requirements/customer-retention.md#L1'."
    • changedInput schema / properties / requirementId / description
      Previous value: -"Optional requirement ID. The strict write set updates this requirement instead of minting a REQ-AUTO id, and a typed logic rule attaches its requires_rule relationship to it."New value: +"Optional requirement ID the strict write set updates instead of minting a REQ-AUTO id."
    • changedInput schema / properties / schemaId / description
      Previous value: -"Optional exact reviewed predicate schema ID. When supplied, Kibi selects that schema instead of lexical rank order and fails closed if it is unavailable."New value: +"Optional exact reviewed predicate schema ID to use instead of rank order; fails closed if unavailable."
    • changedInput schema / properties / source / description
      Previous value: -"Optional primary source path or provenance root used for stable IDs and text refs. Example: '.kb/requirements/customer-retention.md'."New value: +"Optional primary source path used for stable IDs and text refs."
    • removedInput schema / properties / type / anyOf
      Removed value: -[
      -  {
      -    "const": "req",
      -    "type": "string"
      -  },
      -  {
      -    "const": "scenario",
      -    "type": "string"
      -  },
      -  {
      -    "const": "test",
      -    "type": "string"
      -  },
      -  {
      -    "const": "adr",
      -    "type": "string"
      -  },
      -  {
      -    "const": "flag",
      -    "type": "string"
      -  },
      -  {
      -    "const": "event",
      -    "type": "string"
      -  },
      -  {
      -    "const": "symbol",
      -    "type": "string"
      -  },
      -  {
      -    "const": "fact",
      -    "type": "string"
      -  }
      -]
    • changedInput schema / properties / type / description
      Previous value: -"Entity type context for analysis. Requirement, domain-fact, and supporting prose all receive a proposition ledger; only requirements receive deterministic modeling suggestions."New value: +"Entity type context for analysis; only requirements receive deterministic modeling suggestions."
    • addedInput schema / properties / type / enum
      Added value: +[
      +  "req",
      +  "scenario",
      +  "test",
      +  "adr",
      +  "flag",
      +  "event",
      +  "symbol",
      +  "fact"
      +]
    • addedInput schema / properties / type / type
      Added value: +"string"
    • changedInput schema / properties / value / description
      Previous value: -"Optional extracted semantic claim value: a string, number or boolean, or a list of strings for a set claim. Example: ['requireAuth'] with operator includes."New value: +"Optional claim value: string, number, boolean, or a list of strings for a set claim."
    • changedInput schema / properties / workspaceRoot / description
      Previous value: -"Optional absolute path of the workspace this call is about when it differs from the one the server started in, for example the git worktree you are working in. The server answers from that workspace's knowledge base when it is a worktree of the same repository or lies under the client's MCP roots; otherwise it answers from its own workspace and adds a workspace_mismatch diagnostic. Host hooks fill this in automatically where available."New value: +"Optional absolute path of the workspace this call is about, such as your git worktree, when it is not the server's."
    • changedOutput schema / properties / data / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "capabilityPlugins": {
      -        "additionalProperties": {},
      -        "properties": {},
      -        "type": "object"
      -      },
      -      "mode": {
      -        "const": "analyze",
      -        "type": "string"
      -      },
      -      "receipt": {
      -        "additionalProperties": {},
      -        "properties": {},
      -        "type": "object"
      -      },
      -      "warnings": {
      -        "items": {
      -          "type": "string"
      -        },
      -        "type": "array"
      -      }
      -    },
      -    "required": [
      -      "mode"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "applyPlan": {
      -        "items": {
      -          "additionalProperties": {},
      -          "properties": {},
      -          "type": "object"
      -        },
      -        "type": "array"
      -      },
      -      "claim": {
      -        "additionalProperties": {},
      -        "properties": {},
      -        "type": "object"
      -      },
      -      "claimKey": {
      -        "type": "string"
      -      },
      -      "confidence": {
      -        "type": "number"
      -      },
      -      "extractionMode": {
      -        "type": "string"
      -      },
      -      "extractionWarnings": {
      -        "items": {
      -          "type": "string"
      -        },
      -        "type": "array"
      -      },
      -      "isStrict": {
      -        "type": "boolean"
      -      },
      -      "logic": {
      -        "additionalProperties": {},
      -        "properties": {},
      -        "type": "object"
      -      },
      -      "logicClaims": {
      -        "items": {
      -          "type": "string"
      -        },
      -        "type": "array"
      -      },
      -      "migrationWarning": {
      -        "type": [
      -          "string",
      -          "null"
      -        ]
      -      },
      -      "mode": {
      -        "const": "requirement",
      -        "type": "string"
      -      },
      -      "source": {
      -        "type": "string"
      -      },
      -      "sourceFiles": {
      -        "items": {
      -          "type": "string"
      -        },
      -        "type": "array"
      -      },
      -      "statement": {
      -        "type": "string"
      -      },
      -      "vocabularyAlignment": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "diagnostics": {
      -            "items": {
      -              "additionalProperties": {},
      -              "properties": {},
      -              "type": "object"
      -            },
      -            "type": "array"
      -          },
      -          "fallbackUsed": {
      -            "type": "boolean"
      -          },
      -          "redundancyCandidates": {
      -            "items": {
      -              "additionalProperties": {},
      -              "properties": {},
      -              "type": "object"
      -            },
      -            "type": "array"
      -          },
      -          "reviewPlan": {
      -            "items": {
      -              "additionalProperties": {},
      -              "properties": {},
      -              "type": "object"
      -            },
      -            "type": "array"
      -          },
      -          "stamps": {
      -            "items": {
      -              "additionalProperties": {},
      -              "properties": {},
      -              "type": "object"
      -            },
      -            "type": "array"
      -          },
      -          "subject": {
      -            "additionalProperties": {},
      -            "properties": {},
      -            "type": "object"
      -          }
      -        },
      -        "required": [
      -          "subject",
      -          "redundancyCandidates",
      -          "reviewPlan",
      -          "stamps",
      -          "fallbackUsed",
      -          "diagnostics"
      -        ],
      -        "type": "object"
      -      },
      -      "warnings": {
      -        "items": {
      -          "additionalProperties": {},
      -          "properties": {},
      -          "type": "object"
      -        },
      -        "type": "array"
      -      },
      -      "writeSet": {
      -        "additionalProperties": {},
      -        "properties": {},
      -        "type": "object"
      -      }
      -    },
      -    "required": [
      -      "mode"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "applyPlan": {
      -        "items": {
      -          "additionalProperties": {},
      -          "properties": {},
      -          "type": "object"
      -        },
      -        "type": "array"
      -      },
      -      "bindingHints": {
      -        "description": "On provide_argument_bindings: one entry per unbound argument of the recommended candidate with its type, declared constants (allowedValues) when the vocabulary is closed, schema example values and the reason the current value was not accepted. Empty otherwise.",
      -        "items": {
      -          "additionalProperties": {},
      -          "properties": {},
      -          "type": "object"
      -        },
      -        "type": "array"
      -      },
      -      "candidates": {
      -        "items": {
      -          "additionalProperties": {},
      -          "properties": {},
      -          "type": "object"
      -        },
      -        "type": "array"
      -      },
      -      "claimKey": {
      -        "type": "string"
      -      },
      -      "decisionConflicts": {
      -        "description": "When no hash-bound plan ran the contradiction analysis: stored decision facts of current requirements that agree with the complete candidate on its key arguments and decide the opposite (requirementId, factId, effect, proposedEffect, canonicalKey). A warning repeats each one.",
      -        "items": {
      -          "additionalProperties": {},
      -          "properties": {},
      -          "type": "object"
      -        },
      -        "type": "array"
      -      },
      -      "existingGrounding": {
      -        "description": "The grounding links requirementId already has for this claim: matched by claim_key (the same proposition text) or, for a predicate fact, by the recommended candidate's canonical_key (the same predicate tuple in other words; matchedBy says which).",
      -        "items": {
      -          "additionalProperties": {},
      -          "properties": {},
      -          "type": "object"
      -        },
      -        "type": "array"
      -      },
      -      "logicClaims": {
      -        "items": {
      -          "type": "string"
      -        },
      -        "type": "array"
      -      },
      -      "mode": {
      -        "const": "predicates",
      -        "type": "string"
      -      },
      -      "plan": {
      -        "anyOf": [
      -          {
      -            "additionalProperties": {},
      -            "description": "With requirementId and a complete candidate: the hash-bound kibi.compile-plan.v1 that writes the predicate fact and links requires_predicate in one kb_apply_plan call (approvedPlanHash = plan.planHash). Its contradictionAnalysis is the what-if over the current KB plus the plan; a conflict leaves the plan blocked. Null when no plan applies.",
      -            "properties": {},
      -            "type": "object"
      -          },
      -          {
      -            "description": "With requirementId and a complete candidate: the hash-bound kibi.compile-plan.v1 that writes the predicate fact and links requires_predicate in one kb_apply_plan call (approvedPlanHash = plan.planHash). Its contradictionAnalysis is the what-if over the current KB plus the plan; a conflict leaves the plan blocked. Null when no plan applies.",
      -            "type": "null"
      -          }
      -        ]
      -      },
      -      "recommendedAction": {
      -        "anyOf": [
      -          {
      -            "const": "apply_requires_predicate",
      -            "type": "string"
      -          },
      -          {
      -            "const": "provide_argument_bindings",
      -            "type": "string"
      -          },
      -          {
      -            "const": "resolve_schema_reference",
      -            "type": "string"
      -          },
      -          {
      -            "const": "record_ontology_gap",
      -            "type": "string"
      -          },
      -          {
      -            "const": "review_nonlogical",
      -            "type": "string"
      -          },
      -          {
      -            "const": "replace_grounding",
      -            "type": "string"
      -          },
      -          {
      -            "const": "extend_requirement",
      -            "type": "string"
      -          },
      -          {
      -            "const": "keep_existing_grounding",
      -            "type": "string"
      -          }
      -        ]
      -      },
      -      "recommendedPredicateSchema": {
      -        "anyOf": [
      -          {
      -            "additionalProperties": {},
      -            "properties": {},
      -            "type": "object"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ]
      -      },
      -      "relationshipPlan": {
      -        "anyOf": [
      -          {
      -            "additionalProperties": {},
      -            "properties": {},
      -            "type": "object"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ]
      -      },
      -      "relationshipTarget": {
      -        "anyOf": [
      -          {
      -            "description": "The planned predicate fact id (FACT-PRED-...) that a requires_predicate link must target. Candidate ids (SUGGEST-...) are never relationship targets.",
      -            "type": "string"
      -          },
      -          {
      -            "description": "The planned predicate fact id (FACT-PRED-...) that a requires_predicate link must target. Candidate ids (SUGGEST-...) are never relationship targets.",
      -            "type": "null"
      -          }
      -        ]
      -      },
      -      "replacementPlan": {
      -        "anyOf": [
      -          {
      -            "additionalProperties": {},
      -            "properties": {},
      -            "type": "object"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ]
      -      },
      -      "requirementId": {
      -        "type": [
      -          "string",
      -          "null"
      -        ]
      -      },
      -      "source": {
      -        "type": [
      -          "string",
      -          "null"
      -        ]
      -      },
      -      "subject": {
      -        "type": "string"
      -      },
      -      "text": {
      -        "type": "string"
      -      },
      -      "warnings": {
      -        "items": {
      -          "type": "string"
      -        },
      -        "type": "array"
      -      }
      -    },
      -    "required": [
      -      "mode"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "capabilityPlugins": {
      +        "additionalProperties": {},
      +        "properties": {},
      +        "type": "object"
      +      },
      +      "mode": {
      +        "const": "analyze",
      +        "type": "string"
      +      },
      +      "receipt": {
      +        "additionalProperties": {},
      +        "properties": {},
      +        "type": "object"
      +      },
      +      "warnings": {
      +        "items": {
      +          "type": "string"
      +        },
      +        "type": "array"
      +      }
      +    },
      +    "required": [
      +      "mode"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "applyPlan": {
      +        "items": {
      +          "additionalProperties": {},
      +          "properties": {},
      +          "type": "object"
      +        },
      +        "type": "array"
      +      },
      +      "claim": {
      +        "additionalProperties": {},
      +        "properties": {},
      +        "type": "object"
      +      },
      +      "claimKey": {
      +        "type": "string"
      +      },
      +      "confidence": {
      +        "type": "number"
      +      },
      +      "extractionMode": {
      +        "type": "string"
      +      },
      +      "extractionWarnings": {
      +        "items": {
      +          "type": "string"
      +        },
      +        "type": "array"
      +      },
      +      "isStrict": {
      +        "type": "boolean"
      +      },
      +      "logic": {
      +        "additionalProperties": {},
      +        "properties": {},
      +        "type": "object"
      +      },
      +      "logicClaims": {
      +        "items": {
      +          "type": "string"
      +        },
      +        "type": "array"
      +      },
      +      "migrationWarning": {
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "mode": {
      +        "const": "requirement",
      +        "type": "string"
      +      },
      +      "source": {
      +        "type": "string"
      +      },
      +      "sourceFiles": {
      +        "items": {
      +          "type": "string"
      +        },
      +        "type": "array"
      +      },
      +      "statement": {
      +        "type": "string"
      +      },
      +      "vocabularyAlignment": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "diagnostics": {
      +            "items": {
      +              "additionalProperties": {},
      +              "properties": {},
      +              "type": "object"
      +            },
      +            "type": "array"
      +          },
      +          "fallbackUsed": {
      +            "type": "boolean"
      +          },
      +          "redundancyCandidates": {
      +            "items": {
      +              "additionalProperties": {},
      +              "properties": {},
      +              "type": "object"
      +            },
      +            "type": "array"
      +          },
      +          "reviewPlan": {
      +            "items": {
      +              "additionalProperties": {},
      +              "properties": {},
      +              "type": "object"
      +            },
      +            "type": "array"
      +          },
      +          "stamps": {
      +            "items": {
      +              "additionalProperties": {},
      +              "properties": {},
      +              "type": "object"
      +            },
      +            "type": "array"
      +          },
      +          "subject": {
      +            "additionalProperties": {},
      +            "properties": {},
      +            "type": "object"
      +          }
      +        },
      +        "required": [
      +          "subject",
      +          "redundancyCandidates",
      +          "reviewPlan",
      +          "stamps",
      +          "fallbackUsed",
      +          "diagnostics"
      +        ],
      +        "type": "object"
      +      },
      +      "warnings": {
      +        "items": {
      +          "additionalProperties": {},
      +          "properties": {},
      +          "type": "object"
      +        },
      +        "type": "array"
      +      },
      +      "writeSet": {
      +        "additionalProperties": {},
      +        "properties": {},
      +        "type": "object"
      +      }
      +    },
      +    "required": [
      +      "mode"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "applyPlan": {
      +        "items": {
      +          "additionalProperties": {},
      +          "properties": {},
      +          "type": "object"
      +        },
      +        "type": "array"
      +      },
      +      "bindingHints": {
      +        "description": "On provide_argument_bindings: one entry per unbound argument of the recommended candidate with its type, declared constants (allowedValues) when the vocabulary is closed, schema example values and the reason the current value was not accepted. Empty otherwise.",
      +        "items": {
      +          "additionalProperties": {},
      +          "properties": {},
      +          "type": "object"
      +        },
      +        "type": "array"
      +      },
      +      "candidates": {
      +        "items": {
      +          "additionalProperties": {},
      +          "properties": {},
      +          "type": "object"
      +        },
      +        "type": "array"
      +      },
      +      "claimKey": {
      +        "type": "string"
      +      },
      +      "decisionConflicts": {
      +        "description": "When no hash-bound plan ran the contradiction analysis: stored decision facts of current requirements that agree with the complete candidate on its key arguments and decide the opposite (requirementId, factId, effect, proposedEffect, canonicalKey). A warning repeats each one.",
      +        "items": {
      +          "additionalProperties": {},
      +          "properties": {},
      +          "type": "object"
      +        },
      +        "type": "array"
      +      },
      +      "existingGrounding": {
      +        "description": "The grounding links requirementId already has for this claim: matched by claim_key (the same proposition text) or, for a predicate fact, by the recommended candidate's canonical_key (the same predicate tuple in other words; matchedBy says which).",
      +        "items": {
      +          "additionalProperties": {},
      +          "properties": {},
      +          "type": "object"
      +        },
      +        "type": "array"
      +      },
      +      "logicClaims": {
      +        "items": {
      +          "type": "string"
      +        },
      +        "type": "array"
      +      },
      +      "mode": {
      +        "const": "predicates",
      +        "type": "string"
      +      },
      +      "plan": {
      +        "anyOf": [
      +          {
      +            "additionalProperties": {},
      +            "description": "With requirementId and a complete candidate: the hash-bound kibi.compile-plan.v1 that writes the predicate fact and links requires_predicate in one kb_apply_plan call (approvedPlanHash = plan.planHash). Its contradictionAnalysis is the what-if over the current KB plus the plan; a conflict leaves the plan blocked. Null when no plan applies.",
      +            "properties": {},
      +            "type": "object"
      +          },
      +          {
      +            "description": "With requirementId and a complete candidate: the hash-bound kibi.compile-plan.v1 that writes the predicate fact and links requires_predicate in one kb_apply_plan call (approvedPlanHash = plan.planHash). Its contradictionAnalysis is the what-if over the current KB plus the plan; a conflict leaves the plan blocked. Null when no plan applies.",
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "recommendedAction": {
      +        "enum": [
      +          "apply_requires_predicate",
      +          "provide_argument_bindings",
      +          "resolve_schema_reference",
      +          "record_ontology_gap",
      +          "review_nonlogical",
      +          "replace_grounding",
      +          "extend_requirement",
      +          "keep_existing_grounding"
      +        ],
      +        "type": "string"
      +      },
      +      "recommendedPredicateSchema": {
      +        "anyOf": [
      +          {
      +            "additionalProperties": {},
      +            "properties": {},
      +            "type": "object"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "relationshipPlan": {
      +        "anyOf": [
      +          {
      +            "additionalProperties": {},
      +            "properties": {},
      +            "type": "object"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "relationshipTarget": {
      +        "anyOf": [
      +          {
      +            "description": "The planned predicate fact id (FACT-PRED-...) that a requires_predicate link must target. Candidate ids (SUGGEST-...) are never relationship targets.",
      +            "type": "string"
      +          },
      +          {
      +            "description": "The planned predicate fact id (FACT-PRED-...) that a requires_predicate link must target. Candidate ids (SUGGEST-...) are never relationship targets.",
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "replacementPlan": {
      +        "anyOf": [
      +          {
      +            "additionalProperties": {},
      +            "properties": {},
      +            "type": "object"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "requirementId": {
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "source": {
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "subject": {
      +        "type": "string"
      +      },
      +      "text": {
      +        "type": "string"
      +      },
      +      "warnings": {
      +        "items": {
      +          "type": "string"
      +        },
      +        "type": "array"
      +      }
      +    },
      +    "required": [
      +      "mode"
      +    ],
      +    "type": "object"
      +  }
      +]
    • removedOutput schema / properties / diagnostics / items / properties / severity / anyOf
      Removed value: -[
      -  {
      -    "const": "info",
      -    "type": "string"
      -  },
      -  {
      -    "const": "warning",
      -    "type": "string"
      -  },
      -  {
      -    "const": "error",
      -    "type": "string"
      -  }
      -]
    • addedOutput schema / properties / diagnostics / items / properties / severity / enum
      Added value: +[
      +  "info",
      +  "warning",
      +  "error"
      +]
    • addedOutput schema / properties / diagnostics / items / properties / severity / type
      Added value: +"string"
    • removedOutput schema / properties / effects / items / properties / status / anyOf
      Removed value: -[
      -  {
      -    "const": "completed",
      -    "type": "string"
      -  },
      -  {
      -    "const": "failed",
      -    "type": "string"
      -  },
      -  {
      -    "const": "not_applicable",
      -    "type": "string"
      -  }
      -]
    • addedOutput schema / properties / effects / items / properties / status / enum
      Added value: +[
      +  "completed",
      +  "failed",
      +  "not_applicable"
      +]
    • addedOutput schema / properties / effects / items / properties / status / type
      Added value: +"string"
    • removedOutput schema / properties / status / anyOf
      Removed value: -[
      -  {
      -    "const": "success",
      -    "type": "string"
      -  },
      -  {
      -    "const": "committed_with_repairs",
      -    "type": "string"
      -  },
      -  {
      -    "const": "error",
      -    "type": "string"
      -  }
      -]
    • addedOutput schema / properties / status / enum
      Added value: +[
      +  "success",
      +  "committed_with_repairs",
      +  "error"
      +]
    • addedOutput schema / properties / status / type
      Added value: +"string"
  2. Changed4 schema fields changedv0.1.5
    • changedInput schema / properties / operator / anyOf
      Previous value: -[
      -  {
      -    "const": "eq",
      -    "type": "string"
      -  },
      -  {
      -    "const": "gt",
      -    "type": "string"
      -  },
      -  {
      -    "const": "gte",
      -    "type": "string"
      -  },
      -  {
      -    "const": "lt",
      -    "type": "string"
      -  },
      -  {
      -    "const": "lte",
      -    "type": "string"
      -  },
      -  {
      -    "const": "neq",
      -    "type": "string"
      -  },
      -  {
      -    "const": "bool",
      -    "type": "string"
      -  },
      -  {
      -    "const": "polarity",
      -    "type": "string"
      -  }
      -]New value: +[
      +  {
      +    "const": "eq",
      +    "type": "string"
      +  },
      +  {
      +    "const": "gt",
      +    "type": "string"
      +  },
      +  {
      +    "const": "gte",
      +    "type": "string"
      +  },
      +  {
      +    "const": "lt",
      +    "type": "string"
      +  },
      +  {
      +    "const": "lte",
      +    "type": "string"
      +  },
      +  {
      +    "const": "neq",
      +    "type": "string"
      +  },
      +  {
      +    "const": "bool",
      +    "type": "string"
      +  },
      +  {
      +    "const": "polarity",
      +    "type": "string"
      +  },
      +  {
      +    "const": "matches",
      +    "type": "string"
      +  },
      +  {
      +    "const": "includes",
      +    "type": "string"
      +  },
      +  {
      +    "const": "subset_of",
      +    "type": "string"
      +  },
      +  {
      +    "const": "excludes",
      +    "type": "string"
      +  }
      +]
    • changedInput schema / properties / operator / description
      Previous value: -"Optional extracted semantic claim operator. Use gt/lt for strict bounds ('greater than zero' is gt 0, not gte 0). Example: 'eq'."New value: +"Optional extracted semantic claim operator. Use gt/lt for strict bounds ('greater than zero' is gt 0, not gte 0). A set claim takes a list value with eq (exactly these), includes (at least these), subset_of (only these) or excludes (none of these); matches takes a regular expression string. Example: 'eq'."
    • addedInput schema / properties / value / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "number"
      +  },
      +  {
      +    "type": "boolean"
      +  },
      +  {
      +    "items": {
      +      "type": "string"
      +    },
      +    "minItems": 1,
      +    "type": "array"
      +  }
      +]
    • changedInput schema / properties / value / description
      Previous value: -"Optional extracted semantic claim value. Accepts string, number, or boolean."New value: +"Optional extracted semantic claim value: a string, number or boolean, or a list of strings for a set claim. Example: ['requireAuth'] with operator includes."
  3. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint/idempotent/non-destructive, and the description is consistent, reinforcing that it produces plans rather than writing. Beyond that it discloses what each mode returns, that the hash-bound plan's contradictionAnalysis is a what-if over the current KB, and that reviewed bindings vs ontology-gap fallback determine whether a fact plan is emitted. It stops short of stating failure modes (e.g., what happens on an unreviewed binding with schemaId, or clause-not-verbatim errors), which keeps it below 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.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with purpose and scope, then organized mode-by-mode, which is the right structure for a three-mode tool. Individual sentences are long and heavily parenthesized ("the clause ledger, what is grounded, what is ambiguous and suggested modeling..."), so it reads as dense prose rather than scannable bullets, but little of it is 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?

Given 29 parameters, an output schema, and full annotation coverage, the description supplies the essentials: what each mode does, what it returns, and which sibling applies the results. Remaining gaps are mostly edge behavior (validation failures on non-verbatim clauses, incomplete argumentBindings, workspaceRoot semantics), which the schema description carries but the prose does not reinforce.

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, and the description genuinely adds meaning on top: it explains the three mode values, that clauses are for compound prose, that subjectKey/propertyKey/operator/value form the single claim, that logic is optional typed kibi.logic.v1, and that requirementId triggers the hash-bound plan. It leaves the other ~20 parameters (minScore, schemaId, confidence, provenance, argumentBindings) to the schema, which is acceptable given full coverage.

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?

Opens with a specific verb+resource framing ("Turn requirement prose into checkable structure") plus the crucial negative scope ("without writing the KB"), then names the sibling it is not for (kb_compile_intent for whole change requests). Each of the three modes is defined by its output artifact (advisor receipt, strict-lane write set, predicate-fact plan), so an agent can distinguish this from kb_upsert or kb_apply_plan without opening a schema.

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?

Explicitly routes between tools: one requirement's prose goes here, a whole change request goes to kb_compile_intent. It also gives mode-selection guidance (clauses for compound prose, mode:requirement for a single claim, mode:predicates for ontology predicate ranking) and names downstream tools (kb_apply_plan for the hash-bound plan, kb_upsert for other plans, dryRun for pre-fact preview).

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