Skip to main content
Glama

verify_inference

Verify if a fact is formally proven in the knowledge graph before stating it as true. Returns proof chain or suggests adding the fact explicitly.

Instructions

Verify if a fact is FORMALLY PROVEN in the knowledge graph. This is THE KEY TOOL for collaborative LLM-Formal reasoning.

WHEN TO USE (CRITICAL): ✓ BEFORE stating a deduction as fact ✓ When user asks 'Is X true?' or 'Does Y hold?' ✓ After making a soft reasoning step ✓ To distinguish your intuition from formal proof

WORKFLOW:

  1. User asks: 'Is Alice my friend?'

  2. You check: query_memory('ASK { :User foaf:knows :Alice }')

  3. Result: True (they know each other)

  4. Your soft reasoning: 'knows → maybe friends?'

  5. YOU MUST CALL: verify_inference(':User', ':isFriendOf', ':Alice')

  6. Result: 'Not proven'

  7. You respond: 'You know Alice, but friendship isn't formally established.'

  8. If user confirms: Call suggest_rule() to formalize

Returns:

  • If proven: Source (user/rule), confidence, explanation, rule name

  • If not proven: Suggestion to either add explicitly or create rule

Example: verify_inference(subject=':Alice', predicate='foaf:knows', object=':User') → Returns proof chain if fact is formally established

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionNoAction for pending verification: 'accept' or 'reject' (optional)
objectNoObject of the triple (e.g., ':AcmeCorp', ':Bob')
tripleNoFull triple string as seen in pending verifications list (optional fallback)
subjectNoSubject of the triple (e.g., ':Alice', ':User')
predicateNoPredicate/property (e.g., 'foaf:knows', 'schema:worksFor')
Behavior3/5

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

With no annotations, the description carries full burden. It explains return behavior for proven vs not proven and shows a sample flow. However, it omits the 'action' parameter (accept/reject) present in the schema, which suggests the tool may also mutate pending verification states—a significant behavioral gap and potential source of confusion.

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?

Description is well-structured with distinct sections (WHEN TO USE, WORKFLOW, Returns, Example) and front-loaded with purpose. However, it is verbose—especially the workflow numbering and repeated examples—though every part contributes value for a key tool.

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 purpose, usage, workflow, returns, and an example, providing a solid foundation. Yet it fails to address the 'action' parameter, its connection to pending verifications, or the tool's interplay with sibling tools like get_pending_verifications, leaving notable gaps given the tool's complexity.

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?

Schema coverage is 100% with each parameter described, so schema already provides meaning. The description adds a concrete example call but does not deepen semantic understanding beyond schema text. Baseline 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?

Description clearly states the tool verifies if a fact is formally proven in the knowledge graph, using the specific verb 'verify' with a precise resource. It also emphasizes its role as 'THE KEY TOOL' for formal reasoning, distinguishing it from query or rule tools like query_memory and suggest_rule.

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?

Explicit 'WHEN TO USE' section lists critical use cases: before stating a deduction, when users ask 'Is X true?', after soft reasoning, and to distinguish intuition from proof. The workflow example further clarifies how to combine query_memory and verify_inference, and suggests suggest_rule as a follow-up, providing clear guidance against alternatives.

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