Skip to main content
Glama

suggest_rule

Propose SPARQL inference rules to formalize reasoning patterns. Converts approved logical deductions into formal, verifiable knowledge graph guarantees.

Instructions

IMPORTANT: USER APPROVAL REQUIRED / APPROBATION REQUISE Allows the LLM to propose SPARQL rules to formalize reasoning patterns.

CRITICAL WORKFLOW:

  1. EXPLAIN & ASK: You MUST explain the rule and ask for explicit permission FIRST.

    • En Français: "Puis-je ajouter cette règle d'inférence ?"

    • In English: "May I add this inference rule?"

  2. WAIT: Do NOT call suggest_rule until the user says YES.

  3. SUGGEST: Only after approval, call this tool.

  4. CONFIRM: The user must then approve the pending rule using approve_rule (which you CANNOT call yourself).


WHEN TO USE: ✓ After verify_inference() returns 'not proven' for logical deduction ✓ When user explicitly states a rule (e.g., 'friends know each other') ✓ When detecting recurring patterns in conversation ✓ To convert YOUR soft reasoning into FORMAL guarantees

WORKFLOW EXAMPLE:

  1. You: 'Voting implies age >= 18. Shall I formalize this?'

  2. User: 'Yes'

  3. YOU CALL: suggest_rule(...)

  4. System: Previews inferences, adds to pending approval

  5. STOP: You wait for user to review.

CRITICAL - DO NOT BYPASS THIS TOOL: ❌ NEVER edit .rq files directly ❌ NEVER create rules outside this workflow ✓ ALWAYS use suggest_rule() → user approves → system activates

Best Practices:

  • Use descriptive rule_id (snake_case)

  • SPARQL must be CONSTRUCT query

  • Set confidence < 1.0 for uncertain rules

  • Preview shows what WOULD be inferred

Rule goes to PENDING - User must approve!

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rule_idYesUnique identifier for this rule (e.g., 'acquaintance_from_knows')
confidenceNoConfidence level (0.0-1.0) for facts inferred by this rule (default: 0.8)
descriptionYesHuman-readable description of what the rule does
sparql_patternYesSPARQL CONSTRUCT query defining the inference rule
Behavior5/5

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

With no annotations provided, the description fully carries the burden of behavioral disclosure. It explicitly states that user approval is required before calling, that the tool puts rules into a pending state, previews inferences, and that the user must approve via approve_rule (which the LLM cannot call). It also warns 'Rule goes to PENDING - User must approve!' This is thorough and transparent about the tool's behavioral implications.

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 lengthy but well-structured with headers (CRITICAL WORKFLOW, WHEN TO USE, WORKFLOW EXAMPLE, etc.) and front-loads the most critical warning ('**IMPORTANT: USER APPROVAL REQUIRED**'). Some redundancy exists, such as repeated warnings about user approval and bypassing, but each section earns its place and the structure is clear. It could be tightened, but it is not excessive.

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?

For a tool with 4 parameters, no output schema, and no annotations, the description is exceptionally complete. It covers the full workflow, prerequisites, user approval steps, best practices, and expected outcome (previews inferences, adds to pending approval). It even provides example phrases in French and English. All essential context for invoking the tool correctly is present.

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?

The input schema already provides 100% coverage of all three required and one optional parameter, so the baseline is 3. The description adds valuable beyond-schema guidance: 'Use descriptive rule_id (snake_case)', 'SPARQL must be CONSTRUCT query', and 'Set confidence < 1.0 for uncertain rules'. These are practical semantics that improve parameter use beyond the 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 description explicitly states the tool's purpose: 'Allows the LLM to propose SPARQL rules to formalize reasoning patterns.' It uses a specific verb (propose) and resource (SPARQL rules), and distinguishes it from siblings like approve_rule by emphasizing the rule goes to PENDING and the user must approve via approve_rule, which the LLM cannot call. This clearly differentiates it from related tools.

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

Usage Guidelines5/5

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

The description provides explicit WHEN TO USE criteria (e.g., after verify_inference returns 'not proven', when user states a rule) and explicit DO NOT BYPASS constraints (never edit .rq files directly, never create rules outside this workflow). It also outlines the step-by-step workflow with EXAPLAN AND ASK, WAIT, SUGGEST, CONFIRM, making it clear when and how the tool should be used.

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/MauriceIsrael/SmartMemory'

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