Skip to main content
Glama

graph_link_datastore

Link a datastore (or individual document/chunk) to a graph entity, relationship, entity type, or workflow node. Use after discovering relevant documents via datastore tools. Provide a short reason.

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_type": "<subject_type>",
      "subject_id": "<subject_id>",
      "asset_type": "<asset_type>",
      "datastore_id": "<datastore_id>"
    },
    "name": "graph_link_datastore"
  }
}

Input Schema

NameRequiredDescriptionDefault
reasonNoWhy this asset is linked to the subject
file_idNoID of the file/document (required for datastore_document and datastore_chunk)
chunk_idNoID of the chunk (required for datastore_chunk)
link_roleNoRole of the link: related (default), source, evidence, definition, policy, example, owner_context
asset_typeYesType of asset to link
confidenceNoConfidence score 0-1 (for agent-generated links)
subject_idYesID of the subject
datastore_idYesID of the datastore
subject_typeYesType of subject to link the asset to

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false and destructiveHint=false, so the agent knows this is an add-only mutation. The description adds a real convention ('Provide a short reason'), but says nothing about idempotency, duplicate-link handling, or whether links can be removed later — useful context for a write tool that the annotations do not cover.

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, front-loaded with the action and targets, then the sequencing rule. Nothing is repeated and no filler is present.

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 nine-parameter write tool with no output schema, the definition covers purpose, ordering, and the reason convention, but leaves the agent guessing about what a successful call returns (link identifier?) and what happens with invalid or duplicate IDs. Adequate but with visible gaps.

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 all nine parameters, including the link_role vocabulary and the file_id/chunk_id conditional requirements, are already documented in the schema. The description adds only the mapping of 'individual document/chunk' to asset_type and the 'short reason' convention, which is marginal beyond the schema.

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?

States a specific verb ('Link') and resource ('datastore/document/chunk') and enumerates the subject targets (entity, relationship, entity type, workflow node), which maps directly onto the subject_type enum. An agent can tell this is the graph-side write and that graph_linked_datastores is the read counterpart, though the sibling is never named.

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?

'Use after discovering relevant documents via datastore tools' gives explicit sequencing guidance that points the agent at datastore_query/datastore_discover first. It stops short of naming when-not-to-use cases or an alternative for agents that only want to read existing links.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.