Skip to main content
Glama

check_kb

Read-onlyIdempotent

Statically validate a knowledge base to catch parse errors, undefined predicates, recursion with no base case, and duplicate facts or rules.

Instructions

Validate a knowledge base statically, without running it.

Cheap and backend-free: call it before reason when you have just written or edited a knowledge base. It catches syntax errors, predicates used but never defined, recursion with no base case, and duplicate facts or rules.

Returns KBCheckResult:

  • valid (bool): false only when the knowledge base does not parse.

  • errors (list of str): parse failures, with line and column.

  • warnings (list of str): undefined predicates, possible non-termination, duplicates. Warnings do not prevent reasoning.

  • facts_count, rules_count (int): items found.

  • predicates_count (int): distinct name/arity predicate symbols.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
validYesFalse when the knowledge base does not parse.
errorsNoProblems that prevent reasoning, with line/column.
warningsNoUndefined predicates, possible non-termination, duplicates.
facts_countNo
rules_countNo
predicates_countNoDistinct predicate symbols.
Behavior4/5

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

Annotations already declare the tool as read-only, idempotent, and non-destructive. The description adds behavioral details: it is cheap, backend-free, and catches specific errors and warnings, enriching the agent's understanding beyond annotations.

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 well-structured and concise, starting with the core purpose, followed by usage guidance, error types, and return fields. Every sentence adds value without redundancy.

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

Completeness5/5

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

Given the simple parameter schema (one string) and detailed description of the output (KBCheckResult fields), the description provides complete information for an agent to use the tool effectively.

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 description does not elaborate on the single 'knowledge' parameter, but the input schema provides a thorough explanation of the format. Since the schema covers the parameter adequately, a baseline score of 3 is appropriate.

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 clearly states the tool validates a knowledge base statically without running it, and distinguishes it from 'reason' by recommending calling it before reasoning. This is specific and differentiates from siblings.

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?

It explicitly advises using this tool before 'reason' after editing a knowledge base, providing clear context. It does not include exclusions, but the usage context is well-defined.

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/snegi26/euclidMCPPaper'

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