Skip to main content
Glama

create_knowledge_graph_from_file

Read a local JSON file and build a complete knowledge graph in a single call, with an optional validation mode to inspect the payload before any changes.

Instructions

Read a local JSON file and create a complete knowledge graph in one call. Accepts either the raw create_knowledge_graph payload or one nested under payload/knowledgeGraph.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filePathYesPath to a JSON file with graph payload
maxBytesNoMaximum bytes to read from file (default 1000000)
validateOnlyNoIf true, validates and summarizes payload without creating ops

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.8.0

TDQS

A3.9/5.0
Behavior3/5

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

The single annotation (readOnlyHint: false) tells the agent this mutates, and the description aligns with it—no contradiction. The description adds some behavioral context beyond the annotation: 'complete' and 'in one call' imply a batch creation of many ops at once, and the schema's validateOnly parameter clarifies a no-op validation path. However, it does not disclose return format, error handling for malformed files, or whether existing data gets overwritten.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, zero waste. The first sentence front-loads the core action and value proposition; the second delivers the payload-format nuance that would otherwise be a failure point. Every sentence earns its place.

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?

The input side is well covered: file-based input, payload nesting, and validateOnly behavior are all addressed. But with no output schema and a mutating operation, the description omits what the call returns (e.g., created graph summary, ops list, validation report) and gives no sense of scope/destructive risk. An agent invoking this blindly would not know what success looks like.

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 100%, so the baseline is 3. The description adds genuine value beyond the schema by specifying the accepted payload shapes: 'either the raw create_knowledge_graph payload or one nested under payload/knowledgeGraph'—a critical detail not present in filePath's schema description ('Path to a JSON file with graph payload'). This materially reduces the chance of an agent formatting the file incorrectly.

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 states a specific composite action—'Read a local JSON file and create a complete knowledge graph in one call'—with a clear verb and resource. It distinguishes itself from siblings like read_local_file (which only reads) and create_knowledge_graph (which presumably takes direct input) by emphasizing the file-based, batch, single-call nature and the payload nesting flexibility.

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?

Usage context is implied: an agent can infer this is the tool to use when a knowledge graph payload already exists in a local JSON file. However, the description never explicitly names alternatives (e.g., create_knowledge_graph for inline payloads, read_local_file for just reading) or states when not to use this tool, so routing between siblings is left to inference.

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