Skip to main content
Glama

serialize_knowledge

Transform knowledge structures into canonical JSON, optionally using a session_id to serialize existing session state.

Instructions

Serialize a Knowledge Structure into its canonical JSON representation. Optionally accepts 'session_id' to serialize the current state of an existing session.

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"}}]}'.
session_idNoOptional. If provided, serialize 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 full responsibility for behavioral disclosure. It only states the core action and the session option, but fails to explain side effects (e.g., whether a session is created when json_data is used), the precedence when both parameters are provided, or any auth/rate-limit concerns. This is a significant gap for a serialization tool.

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 concise sentences: the first states the primary action, the second covers the session alternative. Both sentences earn their place with no filler or redundancy.

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

Completeness3/5

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

The description covers the two main usage modes (json_data and session_id) but lacks details about the return value (exact JSON structure), error conditions, and the meaning of 'canonical' in this context. Given the complexity of the tool and absence of an output schema, this is a moderate gap that could affect correct invocation.

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?

The input schema already provides 100% coverage for both parameters, including a detailed example for json_data. The description only restates the optional nature of session_id without adding new semantic details, so the baseline score of 3 applies.

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 uses the specific verb 'Serialize' with the resource 'Knowledge Structure' and states the outcome 'canonical JSON representation'. This clearly distinguishes it from sibling tools like validate_knowledge or export_knowledge, which have different purposes.

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 usage context by explaining that session_id is optional for serializing an existing session, implying the alternative of providing json_data for a new structure. However, it does not explicitly mention exclusions or alternatives like export_knowledge, leaving some ambiguity.

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