kb_find_gaps
Find knowledge base entities missing expected relationships, such as requirements without scenarios or tests, by filtering on absent or present links in either direction.
Instructions
List KB entities by the relationships they lack or have. Use for questions like which requirements lack scenarios or tests; all filters must match, and a relationship counts in either direction. Use kb_coverage instead for proof status and repair plans, and kb_check for rule violations. No mutation side effects.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tags | No | Keep entities carrying any of these metadata tags. Bootstrap provenance stubs appear in rows only when this names bootstrap:provenance-stub. | |
| type | No | Only report entities of this type. Omit for all types. | |
| limit | No | Maximum rows to return; count reports the full total. | |
| offset | No | Zero-based row offset for pagination. | |
| sourceFile | No | Keep entities whose source path contains this substring. | |
| workspaceRoot | No | 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. | |
| missingRelationships | No | Relationship types the entity must have none of, in either direction, for example specified_by or verified_by. verified_by and validates satisfy each other. | |
| presentRelationships | No | Relationship types the entity must have at least one of each, in either direction. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | ||
| error | No | ||
| status | Yes | ||
| effects | Yes | ||
| operation | Yes | ||
| diagnostics | Yes | ||
| nextActions | Yes | ||
| kibiProtocol | Yes | ||
| resultVersion | Yes |