Skip to main content
Glama

get_knowledge_graph

Read-onlyIdempotent

Build a knowledge graph from stored memories, returning entities as nodes and relationships as edges. Use to visualize connections between concepts.

Instructions

Build a knowledge graph from stored memories. Returns entities as nodes and relationships as edges. Use for visualizing connections between concepts. Requires enhanced intelligence mode with prior entity extraction. Read-only. Returns: {nodes[], edges[]} where nodes have {id, type, name, memories[]} and edges have {from, to, type, confidence}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum nodes to return. Range: 1-100. Default: 20. Edges limited proportionally.
entity_nameNoFilter nodes containing this name (case-insensitive substring match). Omit for all entities.
entity_typeNoFilter nodes by type: 'people', 'organizations', 'technologies', or 'projects'. Omit for all types.
relationship_typeNoFilter edges by relationship: 'WORKS_FOR', 'USES', 'BUILT_WITH', 'KNOWS', etc. Omit for all relationships.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed5 schema fields changedv1.3.2
    • changedInput schema / properties / entity_name / description
      Previous value: -"Filter by specific entity name"New value: +"Filter nodes containing this name (case-insensitive substring match). Omit for all entities."
    • changedInput schema / properties / entity_type / description
      Previous value: -"Filter by entity type (people, organizations, technologies, projects)"New value: +"Filter nodes by type: 'people', 'organizations', 'technologies', or 'projects'. Omit for all types."
    • removedInput schema / properties / limit / default
      Removed value: -20
    • changedInput schema / properties / limit / description
      Previous value: -"Maximum number of nodes to return"New value: +"Maximum nodes to return. Range: 1-100. Default: 20. Edges limited proportionally."
    • changedInput schema / properties / relationship_type / description
      Previous value: -"Filter by relationship type (WORKS_FOR, USES, BUILT_WITH, etc.)"New value: +"Filter edges by relationship: 'WORKS_FOR', 'USES', 'BUILT_WITH', 'KNOWS', etc. Omit for all relationships."
  2. First observedv1.3.1

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already mark the tool as read-only and non-destructive, and the description reinforces this with 'Read-only.' It adds valuable behavioral context beyond annotations by disclosing the enhanced-intelligence prerequisite and prior entity-extraction dependency, and by specifying the exact node/edge return shape.

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 efficiently organized: purpose first, then use case, prerequisite, read-only note, and return shape. Every sentence contributes meaningful information, though the 'Read-only' sentence is redundant with annotations and could be omitted.

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 tool's moderate complexity, the description covers the main invocation context: what it returns, when to use it, the required mode, and read-only behavior. The schema covers all parameter semantics. A minor gap is lack of guidance on alternative tools for similar graph/connection tasks, but overall the tool is well specified.

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?

The input schema already provides 100% coverage with detailed descriptions for all four parameters, including ranges, defaults, filter semantics, and example values. The description adds no additional parameter-level meaning, so baseline 3 is appropriate.

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 opens with a specific verb and resource: 'Build a knowledge graph from stored memories.' It clearly distinguishes itself from sibling memory retrieval tools by emphasizing entities-as-nodes/relationships-as-edges and the use case of visualizing connections between concepts.

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?

The description explicitly states when to use the tool: 'Use for visualizing connections between concepts.' It also provides a critical prerequisite: 'Requires enhanced intelligence mode with prior entity extraction.' However, it does not explicitly mention alternatives or when-not-to-use scenarios relative to siblings like find_connections.

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

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/n3wth/r3'

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