Skip to main content
Glama

add_fact

Add a subject-predicate-object triple to the knowledge graph with optional source attribution and confidence levels.

Instructions

Add a new fact (subject-predicate-object triple).

Args: subject: Subject entity name (e.g., "John Smith") predicate: Relationship type (e.g., "works_at", "served_in") object: Object entity name (e.g., "Acme Corp") subject_type: Type of subject (e.g., "person", "organization") object_type: Type of object (e.g., "organization", "military_unit") context: Optional context description (e.g., "as squad leader") confidence: Confidence level 0.0-1.0 (1.0 = verified/manual) valid_from: Start date of validity (ISO format: YYYY-MM-DD) valid_to: End date of validity (ISO format: YYYY-MM-DD) source_type: Source type ("note", "document", "glossary", "manual") source_id: Source UUID (for notes/glossary) source_path: Source path (for documents) source_hash: Content hash (for documents) source_location: Location within source (e.g., "page 3")

Returns: Created fact as dict

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
objectYes
contextNo
subjectYes
valid_toNo
predicateYes
source_idNo
confidenceNo
valid_fromNo
object_typeNoentity
source_hashNo
source_pathNo
source_typeNo
subject_typeNoentity
source_locationNo
Behavior3/5

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

Without annotations, the description only states the tool 'adds' a fact and returns a dict. It does not disclose side effects, idempotency, permissions, or error behavior. However, the core operation is straightforward, so the transparency is adequate but not enhanced.

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 purpose sentence followed by a parameter list. It is front-loaded and easy to scan, though slightly verbose due to listing all 14 parameters individually. Minor redundancy could be reduced by grouping source fields, but overall clear.

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?

Given 14 parameters and no output schema or annotations, the description covers the operation and parameter semantics comprehensively. It lacks details on return value structure, validation rules, or error conditions, but the core creation function is sufficiently defined for most use cases.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the parameter descriptions add substantial value: each parameter has a clear description with examples (e.g., subject: 'Subject entity name (e.g., "John Smith")') and defaults are stated (e.g., confidence default 1, subject_type default 'entity'). This fully compensates for the lack of 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 clearly states the tool adds a new fact in subject-predicate-object triple format. The verb 'Add' and resource 'fact' are precise, and the triple explanation distinguishes from sibling tools like add_facts_batch (batch) and update_fact.

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

Usage Guidelines2/5

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

No guidance on when to use this tool versus alternatives such as add_facts_batch or update_fact. There are no conditions, prerequisites, or context for invocation provided.

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/michaelkrauty/mcp-notes'

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