Skip to main content
Glama

KG Query

memory-kg-query

Query knowledge graph triples by subject, predicate, or object to retrieve exact facts, with active-only filtering to return valid relationships.

Instructions

Query knowledge graph triples. Filter by subject, predicate, and/or object.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "memory-kg-query"
  }
}

Input Schema

NameRequiredDescriptionDefault
objectNoFilter by target.
subjectNoFilter by subject.
predicateNoFilter by relationship.
activeOnlyNoOnly valid facts (default: true).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.6.0

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 beyond the fact that it queries. It does not state that the operation is read-only, whether an unfiltered call returns the entire graph, whether results are paginated or bounded, or what a returned triple looks like.

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 with the purpose front-loaded and no wasted framing. The second sentence largely echoes the schema's property descriptions, which is mildly redundant but keeps the call self-contained.

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?

For a simple four-parameter, all-optional query tool with no annotations and no output schema, the description covers the minimum an agent needs to invoke it. It falls short on result shape and unfiltered-query behavior, which matter for a graph query with no required parameters.

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 description coverage is 100%, so the schema already defines all four parameters and the baseline of 3 applies. The description adds only the "and/or" combinability hint, while the important default on activeOnly is documented in the schema rather than the description.

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?

Names a specific verb and resource ("Query knowledge graph triples") plus the filter dimensions, so the operation is unambiguous. It does not distinguish itself from adjacent read tools such as memory-search or memory-kg-timeline, so sibling differentiation is left to the agent.

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?

"Filter by subject, predicate, and/or object" implies that any combination of filters is legal and that omitting them widens the query, which is useful implied usage. There is no explicit statement of when to prefer this over memory-search or memory-kg-timeline, nor any warning about unfiltered scans.

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