Skip to main content
Glama

add_fact

Declare entities or assert typed relationships in the knowledge graph for surgical corrections, fixing inaccuracies with provenance tracking.

Instructions

Write a correction into the knowledge graph. With only 'subject', declares/upserts a single entity. With 'subject', 'relation', and 'object', asserts a typed relationship between two entities (creating either endpoint if missing). Valid relations: CITES, CONTRASTS_WITH, EXTENDS, INFLUENCES, UNCERTAIN_SAME_AS, UNTYPED_RELATION. Manual writes are tagged source='manual_mcp'. Use for surgical fixes, not bulk import.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
objectNoTarget entity name. Omit to just declare 'subject'.
subjectYesEntity name (the source entity).
evidenceNoOptional ≤200-char justification stored on the edge.
relationNoRelationship type. Required only when 'object' is given.
confidenceNoConfidence 0.0–1.0 (default 1.0 for human-asserted facts).
object_typeNoEntity type for object (default Concept).Concept
subject_typeNoEntity type for subject (default Concept).Concept
Behavior4/5

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

Without annotations, description fully discloses upsert semantics ('declares/upserts'), confidence range, evidence length limit, and the source tagging. It does not cover potential side effects like overwriting existing edges or error conditions, but covers core behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Six sentences, no redundant words. Information is front-loaded: purpose first, then modes, relation list, tagging note, and usage advice. Every sentence adds value.

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?

Covers all main use cases and parameter combinations. Missing output schema but not critical for a write tool. Lacks explicit error handling or idempotency statement, but still adequate for a focused tool with 7 parameters.

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%, baseline 3. Description adds meaning by explaining the dual-mode logic (entity vs. relationship), listing valid relations, and noting the default confidence rationale for human-asserted facts. Evidence length constraint is also clarified.

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 writes corrections into a knowledge graph, with two distinct modes (entity declaration or relationship assertion). It differentiates itself from siblings like delete_edge or forget_entity by focusing on adding facts.

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?

Provides explicit advice: 'Use for surgical fixes, not bulk import.' Valid relations are listed, and the manual-write tagging is noted. However, it does not explicitly contrast with alternatives like ingest_url for bulk imports.

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/KlossKarl/loom'

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