Skip to main content
Glama

create_guarantee

Create a code guarantee to enforce structural invariants using Datalog rules or contract schemas.

Instructions

Create a new code guarantee.

Two types supported:

  1. Datalog-based: Uses rule field with Datalog query (violation/1)

  2. Contract-based: Uses type + schema for JSON validation

Examples:

  • Datalog: name="no-eval" rule="violation(X) :- node(X, "CALL"), attr(X, "name", "eval")."

  • Contract: name="orders" type="guarantee:queue" priority="critical" schema={...}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesUnique name for the guarantee
ruleNoDatalog rule defining violation/1 (for Datalog-based guarantees)
severityNoSeverity for Datalog guarantees: error, warning, or info
typeNoGuarantee type for contract-based: guarantee:queue, guarantee:api, guarantee:permission
priorityNoPriority level: critical, important, observed, tracked
statusNoLifecycle status: discovered, reviewed, active, changing, deprecated
ownerNoOwner of the guarantee (team or person)
schemaNoJSON Schema for contract-based validation
conditionNoCondition expression for the guarantee
descriptionNoHuman-readable description
governsNoNode IDs that this guarantee governs
Behavior2/5

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

With no annotations, the description must disclose behavioral traits. It states creation but omits side effects (e.g., overwrite on duplicate name), required permissions, error scenarios, or idempotency. The examples illustrate usage but not behavior beyond creation.

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 concise (few sentences) and front-loaded with the core purpose. It uses bullet points and examples effectively. However, it could be slightly more compact by removing redundancy in the examples.

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 use cases and parameter combinations. However, it lacks details about return values (no output schema), error handling, or what happens after creation. For 11 parameters including nested objects, more context on expected outcomes would improve completeness.

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

Parameters4/5

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

Schema description coverage is 100%, so the schema documents each parameter. However, the description adds significant value by explaining the two types (Datalog vs. contract), showing how parameters like 'rule' and 'type' interact, and providing concrete examples that clarify parameter usage beyond schema descriptions.

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 name 'create_guarantee' and description 'Create a new code guarantee' clearly indicate the tool's purpose. The description elaborates on two supported types with examples, distinguishing creation from sibling tools like check_guarantees and delete_guarantee.

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

Usage Guidelines2/5

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

The description outlines two types of guarantees but provides no guidance on when to use this tool versus alternatives (e.g., check_guarantees for checking, update for modification). No explicit when-to-use, prerequisites, or exclusions are mentioned.

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/Disentinel/grafema'

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