Skip to main content
Glama

palace_kg_add

Adds a subject-predicate-object fact to a knowledge graph, with optional valid date and source closet, so agents can store project memory for grounded retrieval.

Instructions

Add a fact to the knowledge graph. Subject → predicate → object.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "subject": "<subject>",
      "predicate": "<predicate>",
      "object": "<object>"
    },
    "name": "palace_kg_add"
  }
}

Input Schema

NameRequiredDescriptionDefault
objectYes
subjectYes
predicateYes
valid_fromNoYYYY-MM-DD (optional)
source_closetNoCloset ID (optional)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.20.5

TDQS

B3.2/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden, and it discloses almost nothing: it does not say whether duplicate triples are rejected or merged, whether the add is idempotent, what happens if a conflicting fact already exists, or how valid_from defaults. For a mutation tool with zero annotation coverage this is a meaningful 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?

Two short sentences, front-loaded with the action and followed by the data shape; nothing is padded. It is perhaps too terse given what is left unsaid, but there is no wasted wording.

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?

For a five-parameter mutation tool with no annotations and no output schema, the definition says nothing about the return value, error conditions, or duplicate handling. An agent could form the call correctly but would not know how the graph reacts to an existing or contradictory fact.

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 description coverage is 40%, with valid_from ("YYYY-MM-DD (optional)") and source_closet ("Closet ID (optional)") documented in the schema; the three required parameters are undocumented there, but the description's triple notation supplies their directed semantics (subject → predicate → object), which is the key thing an agent needs. Only the temporal/source semantics of the optional params are left for the schema to carry.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

"Add a fact to the knowledge graph" gives a specific verb (add) and resource (the knowledge graph), and the Subject → predicate → object notation pins down exactly what shape of fact is stored. It is clearly distinct from read-oriented siblings such as palace_kg_query or mutating ones like palace_kg_invalidate, though it never names them.

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 (recording a fact as a triple) but gives no explicit when-to-use guidance, no mention of when to use palace_kg_invalidate instead of adding a corrected fact, and no warning about checking for duplicates first with palace_check_duplicate. The context is inferable from the name and the triple format but nothing is stated.

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