Skip to main content
Glama

add_fact

Record a subject-predicate-object fact into the knowledge graph, with optional context, confidence, validity dates, and source metadata for traceability.

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
Install Server

TDQS

A3.8/5.0
Behavior2/5

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

With no annotations provided, the description must carry the full burden of behavioral disclosure. It only states that the tool adds a fact and returns the created fact dict. It does not mention idempotency, duplicate handling, validation rules, side effects, or any potential non-obvious behavior. For a mutation tool, this is a significant gap.

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 structured as a parameter list with examples, making it easy to scan. While it is long (necessary for 14 parameters), each line contributes value. It is front-loaded with the core purpose. No fluff or redundant content.

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 the complexity (14 parameters, no output schema, no annotations), the description covers parameter semantics and the return type. It does not explain error conditions, authentication, or integration with other tools, but for a single-fact add operation, it provides sufficient context for correct invocation.

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?

Schema description coverage is 0%, so the description fully compensates. It provides detailed, example-rich explanations for all 14 parameters, including formats for dates, confidence ranges, and source fields. This adds substantial meaning beyond the schema titles and types.

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 'Add a new fact (subject-predicate-object triple).' This is a specific verb with a well-defined resource and data structure. It distinguishes itself from siblings like `add_facts_batch` through the singular 'a new fact' vs. batch, and the explanation of the triple format.

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 for adding a single fact, but does not explicitly state when to choose this tool over `add_facts_batch` or other fact-related tools. There is no mention of conditions, prerequisites, or exclusions. It is clear what the tool does, but alternative routing is absent.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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