Skip to main content
Glama

load_custom_rule

Load a SPARQL CONSTRUCT rule to infer new triples in the SmartMemory knowledge graph, enabling custom logic-based reasoning.

Instructions

Loads a new custom SPARQL CONSTRUCT rule from text.

The rule should be a SPARQL CONSTRUCT query that infers new triples.

PREFIX declarations are optional - common prefixes (rdf, schema, foaf, etc.) will be auto-added if not present.

Example rule content: CONSTRUCT { ?person rdf:type :Engineer . } WHERE { ?person schema:worksFor :Company . }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rule_idYesA unique ID for the new rule (lowercase, underscores only).
descriptionNoA short description of what the rule does.
rule_contentYesThe SPARQL CONSTRUCT query (PREFIX declarations optional).
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It does disclose the useful behavior that PREFIX declarations are optional and auto-added. However, it does not explain key behaviors like whether the rule is immediately active, whether it is persisted, if it overwrites existing rules, or if it requires approval (given siblings approve_rule/reject_rule exist). This is ambiguous for a mutation tool.

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 and front-loaded with the main purpose. It includes a necessary explanation of the rule format, a useful note about prefixes, and a concrete example. It is not overly verbose, though the example could be seen as extra, it earns its place.

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

Completeness2/5

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

Given the tool has no output schema and no annotations, the description should explain what happens after loading, e.g., whether the rule is activated immediately, goes to a pending state for approval, or how errors are handled. The lack of such details is a significant gap, especially with sibling approve_rule/reject_rule suggesting a workflow.

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 coverage is 100%, providing a baseline of 3. The description adds meaning beyond the schema by explaining that rule_content should be a SPARQL CONSTRUCT query, showing an example, and clarifying that prefixes are optional. This helps an agent construct valid input.

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 'Loads a new custom SPARQL CONSTRUCT rule from text' with a specific verb and resource. The example rule content and explanation about inferences distinguish it from siblings like list_rules or approve_rule.

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

Usage Guidelines3/5

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

The description implies usage: use this when you have a custom SPARQL CONSTRUCT rule to load. It gives guidance on the rule format (SPARQL CONSTRUCT query, optional prefixes) but does not explicitly mention when to use this versus alternatives like suggest_rule or when not to use it.

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