Skip to main content
Glama

evolve_knowledge

Apply evolution operators to a knowledge structure to add, remove, update, or rename objects and relations. Returns a new session_id and version_id for tracking and rollback.

Instructions

Apply structural evolution operators to a Knowledge Structure. Returns a new 'session_id' and 'version_id'. The 'session_id' can be used with list_versions and revert_version.

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"}}]}'.
operationsNoList of evolution operators to apply, in order. Each operator is an object with a 'type' field; the other required fields depend on that type and are NOT interchangeable between operators: - 'add_object': requires 'identity' ({'id','type','name'}) and optional 'structure' (a free-form dict). Fails if the id already exists -- use 'update_object' to change an existing object instead. - 'add_relation': requires 'identity', 'participants' (list of existing object ids), 'relation_type', and optional 'structure'. - 'remove_object': requires 'object_id' (NOT 'identity'). Removing an object also cascade-removes every relation that references it; the response's 'cascade_removed_relations' lists what was removed. - 'remove_relation': requires 'relation_id' (NOT 'identity'). Only valid for an id that is actually a relation -- use 'remove_object' for a plain object. - 'update_object': requires 'object_id' and 'structure_patch' (a dict of fields to change), and optional 'mode' ('merge', the default -- shallow-merges structure_patch into the existing structure, and a patch value of null deletes that key -- or 'replace', which replaces the whole structure dict). Use this instead of remove_object + add_object to change an object's content: the object's id and every relation referencing it are left untouched, with no cascade. - 'rename_object': requires 'object_id' and 'new_name'. Changes only the human-readable identity.name of an existing object or relation, leaving its id, type, structure, and every referencing relation completely untouched — zero cascade, no relation rebuild. Example: '[{"type": "add_object", "identity": {"id": "obj-2", "type": "Lemma", "name": "New"}, "structure": {}}, {"type": "add_relation", "identity": {"id": "rel-1", "type": "Relation", "name": "r"}, "participants": ["obj-1", "obj-2"], "relation_type": "derives"}, {"type": "update_object", "object_id": "obj-1", "structure_patch": {"summary": "revised text"}}, {"type": "rename_object", "object_id": "obj-2", "new_name": "Renamed Lemma"}]'.
session_idNoOptional. If provided, evolve the current structure of this session instead of creating a new session from json_data.
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions that the tool returns a new session_id and version_id, which is a useful behavioral detail. However, it does not disclose potentially destructive side effects (e.g., remove_object cascade-deletes relations), mutation semantics (evolving an existing session vs. creating a new one), or failure modes. This is a significant gap for a tool that can modify or delete knowledge structures.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

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

The description is two sentences and front-loads the core purpose. The first sentence states what the tool does, and the second sentence provides actionable output information. Every word earns its place. There is no fluff or repetition of schema content.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is complex (three parameters, one required, operations with many variants) and there is no output schema. The description only mentions the return of session_id and version_id, omitting the overall behavior of applying operators, the meaning of a new session, or what happens when session_id is provided. It gives no hint about the breadth of operations defined in the schema, leaving the agent without a high-level understanding of the tool's capabilities and side effects.

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 tool description itself adds no parameter semantics; all details are in the input schema, which is exceptionally thorough with operator types, required fields, examples, and cascade behaviors. The description neither adds nor detracts from the schema, so a baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a clear verb+resource: 'Apply structural evolution operators to a Knowledge Structure.' It also explains the return values (new session_id and version_id). While it doesn't explicitly differentiate from siblings like merge_knowledge or construct_knowledge, the concept of 'evolution operators' is specific enough. The purpose is clear but not maximally distinct from other knowledge-structure tools.

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

Usage Guidelines3/5

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

The description implies usage: you apply evolution operators to a Knowledge Structure. It also mentions that the resulting session_id can be used with list_versions and revert_version, giving some post-use context. However, it does not explicitly state when to use this tool versus alternatives (e.g., when to use construct_knowledge for creation or merge_knowledge for combining), nor does it provide any exclusions or prerequisites.

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