Skip to main content
Glama

Draft rules from a policy

import_policy_rules
Read-only

Convert a written policy document into DRAFT decision rules (LLM-assisted).

Returns validated draft rules (when/action, including chained asserts where the policy stages its determinations), derived rule→rule edges, and overlap warnings. Each returned rule carries a citation field holding the policy sentence it encodes (also summarized in the top-level citations map). NOTHING IS SAVED: review the drafts (and show them to the user), then persist explicitly with put_rules — validate first with dry_run=true, and keep each rule's citation in the YAML you save so the audit trail back to the policy survives.

Args: domain: Domain the rules are drafted for (an owned domain or a new name). policy_text: The policy document text (max ~50k characters).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
domainYes
policy_textYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

TDQS

A4.5/5.0
Behavior5/5

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

Although the annotation readOnlyHint=true already signals read-only behavior, the description goes further by explicitly stating 'NOTHING IS SAVED,' which reinforces the safety profile. It also discloses return behavior (validated draft rules, edge list, overlap warnings, citation fields) and offers validation advice (dry_run=true). This adds meaningful context beyond the annotation without contradicting it.

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 well-structured with a clear opening sentence, a detailed body explaining the outputs and the no-save behavior, and an Args section. It is somewhat lengthy but every part contributes value: the workflow guidance, return details, and parameter descriptions are all necessary for a tool of this complexity.

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 description covers the tool's purpose, output content, side-effect-free behavior, and the follow-up workflow with put_rules. It mentions constraints like the 50k character limit. Given that an output schema exists, the description doesn't need to enumerate return fields, but it still provides a solid overall picture. Minor gaps include lack of error-condition examples and broader alternative guidance, but it is sufficiently complete for a complex drafting tool.

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?

With 0% schema description coverage, the description must carry the full burden of explaining parameters. It does so by defining 'domain' as 'Domain the rules are drafted for (an owned domain or a new name)' and 'policy_text' as 'The policy document text (max ~50k characters).' These explanations add meaningful constraints and context that the schema alone lacks.

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's function: 'Convert a written policy document into DRAFT decision rules (LLM-assisted).' It identifies the specific resource (policy document), the outcome (draft rules), and the key distinction that these are drafts, not persisted rules. This differentiates it from sibling tools like 'put_rules' (which saves rules) and 'list_rules' (which lists existing rules).

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 workflow guidance: it explicitly instructs to review drafts and then 'persist explicitly with put_rules — validate first with dry_run=true.' This reveals when to use this tool (for drafting) and what to do next (use a different tool for saving). It doesn't explicitly state alternatives to avoid, but the mention of put_rules as the persistence step gives a strong contextual framework.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A4.3/5.0
Disambiguation5/5

Each tool serves a clearly distinct purpose: decide executes decisions, rule management tools (get_rule_source, list_rules, put_rules) each address different aspects of rule viewing/editing, import_policy_rules handles policy-to-rule drafting, and document tools handle knowledge base content. No two tools are easily confused.

Naming Consistency5/5

All tool names follow a consistent verb_noun snake_case pattern, e.g., list_rules, get_usage, put_rules, import_policy_rules. The single-verb 'decide' fits naturally as the core action. There is no mixing of styles or unpredictable naming.

Tool Count5/5

With 8 tools, the server is well-scoped for its purpose of rule-based decisioning with RAG support. Each tool represents a distinct capability in the workflow—policy ingestion, rule authoring, knowledge base management, decision execution, and usage monitoring—without excess.

Completeness4/5

The tool set covers the core lifecycle: ingest policy text, import draft rules, publish rules, list rules/source, and execute decisions. Minor gaps exist such as no explicit delete for documents or rules (though put_rules with empty YAML can effectively clear rules), and domain listing is indirect via list_rules. These are workable omissions.