Skip to main content
Glama

validate_knowledge

Validate a Canonical Knowledge Structure (CKS) to ensure its integrity and correctness. Returns validation results and diagnostics, with options to reuse a session or apply extra rules.

Instructions

Validate a Canonical Knowledge Structure. Returns validation result and diagnostics. Optionally accepts 'session_id' to validate an existing session's current state instead of creating a new one. Optionally accepts 'extensions' to opt into additional, non-default validation rules for this call only (see 'extensions' parameter). Returns a 'session_id' that can be used with list_versions and revert_version to track and manage version history.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
json_dataYesA valid CKS Knowledge Structure as a JSON string. Each object has an 'identity' ({'id', 'type', 'name'}) and a free-form 'structure' dict. Relations are objects whose 'structure' contains 'participants' (a list of object ids) and 'relation_type'. Example: '{"objects": [{"identity": {"id": "obj-1", "type": "Definition", "name": "Photosynthesis"}, "structure": {"content": "..."}}, {"identity": {"id": "rel-1", "type": "Relation", "name": "r"}, "structure": {"participants": ["obj-1", "obj-2"], "relation_type": 'derives"}}]}'.
extensionsNoOptional list of opt-in validation extensions to apply for this call only (does not affect other calls). Currently available: 'embedding_projection', 'verification_record', 'type_hierarchy', 'relation_type', 'mutual_exclusion', 'functional_relation', 'inference_referential_integrity', 'confidence_bounds', 'supersession_chain', 'inference_confidence_conflict' (see ADR-001: these apply to 'InferenceStep' objects -- {'identity': {'id': ..., 'type': 'InferenceStep', 'name': ...}, 'structure': {'premises': [...], 'conclusion': <object_id>, 'operator': 'deductive|inductive|abductive|heuristic', 'confidence': 0.0-1.0, 'justification': ..., 'alternatives_considered': [...], 'superseded_by': <object_id> | null}}. 'inference_confidence_conflict' flags active (non-superseded) InferenceSteps that share a conclusion but disagree on confidence, at WARNING severity rather than ERROR). Examples of contradiction rules: - MutualExclusionRule: {"identity": {"id": "rule-1", "type": "MutualExclusionRule", "name": "no-support-and-refute"}, "structure": {"relation_type_a": "supports", "relation_type_b": "refutes"}}. This flags when the SAME source-target pair has BOTH a 'supports' and a 'refutes' relation. - FunctionalRelationRule: {"identity": {"id": "rule-2", "type": "FunctionalRelationRule", "name": "single-orbit"}, "structure": {"relation_type": "orbits"}}. This flags when a single source has MORE THAN ONE target via 'orbits'. Example of a correct EmbeddingProjection with its 'represents' relation: {"objects": [{"identity": {"id": "src-1", "type": "Document", "name": "Real paper"}, "structure": {}}, {"identity": {"id": "proj-1", "type": "EmbeddingProjection", "name": "projection"}, "structure": {"store_ref": "vecdb://xyz"}}, {"identity": {"id": "rel-1", "type": "Relation", "name": "r"}, "structure": {"participants": ["src-1", "proj-1"], "relation_type": "represents"}}]}. Example of TypeDefinition and TypeRule for ontology validation: {"objects": [{"identity": {"id": "td-1", "type": "TypeDefinition", "name": "Planet"}, "structure": {"type_name": "Planet", "parent_type": "CelestialBody"}}, {"identity": {"id": "tr-1", "type": "TypeRule", "name": "orbits rule"}, "structure": {"relation_type": "orbits", "allowed_source_types": ["Planet", "Moon"], "allowed_target_types": ["Star", "Planet"]}}]}.
session_idNoOptional. If provided, validate the current structure of this session instead of creating a new session from json_data.
Behavior4/5

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

With no annotations, the description carries the full burden. It discloses side effects (creation of a session when session_id is absent), the per-call nature of extensions, and the return of a session_id for version tracking. It does not provide exhaustive details on permissions or reversibility, but it gives a reasonably transparent behavioral overview for a validation tool.

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 front-loaded with the core purpose and is divided into short, actionable sentences. It is slightly redundant with the schema but not bloated. Each sentence serves a distinct informative function: purpose, return value, optional modes, and return usage.

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?

The tool has 3 parameters, a rich schema, and no output schema. The description covers the main aspects: what it validates, optional behaviors, return value, and how the returned session_id can be used with version tooling. It does not detail the exact shape of validation results, but that may be standard for the domain and is adequately summarized as 'validation result and diagnostics'.

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

Parameters3/5

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

Schema description coverage is 100%, so the baseline is 3. The description does not add meaningful new information about parameters beyond what the schema already provides; it merely restates the purpose of session_id and extensions. It does not clarify the format of json_data beyond the schema's detailed example.

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 'Validate a Canonical Knowledge Structure', a specific verb+resource pairing that clearly identifies the tool's function. It distinguishes itself from siblings by focusing on validation rather than evolution, construction, or versioning operations. The mention of 'Returns validation result and diagnostics' further clarifies the core purpose.

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

Usage Guidelines4/5

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

The description provides clear context on when to use the tool, including the option to validate an existing session's current state or create a new session, which is a mode selection. It explains how extensions and session_id alter behavior. However, it does not explicitly compare against alternative tools like detect_contradictions or verify_source, so it lacks explicit exclusions.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Deus-corp/cks-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server