Skip to main content
Glama

database_graph_infer

Proposes edges between rows of two tables that no column connects. For each row of from_table it takes the closest rows of to_table by meaning (both tables need semantic search) and asks a model, through llm11, whether each pair is really related and how. Every suggestion is stored as a proposed edge with its confidence and reason, which search and traversal ignore until somebody approves it with database_edge_upsert. Nothing is applied on its own. The chosen columns of the rows considered are sent to llm11; the dry run says how many rows and roughly what it costs.

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": {
      "productId": "<productId>",
      "databaseId": "<databaseId>",
      "from_table": "<from_table>",
      "to_table": "<to_table>",
      "label": "<label>"
    },
    "name": "database_graph_infer"
  }
}

Input Schema

NameRequiredDescriptionDefault
labelYesThe relationship to look for, e.g. mentions.
limitNoRows of from_table to consider.
confirmNoRequired for destructive operations. Without it a destructive call returns its plan and refuses, exactly as dry_run would.
dry_runNoReturn the plan without applying it: the resources it would create, change or destroy, and an estimated monthly cost. Free, and has no side effects. Call this before any change you have not made before.
to_tableYesA table in the database, as schema.table or just table (public is assumed). It needs a single-column primary key.
productIdYesProduct identifier, e.g. prd_7k2m9x4qw1nv8bz3ct6d.
databaseIdYesDatabase identifier, from product_get or database_get.
from_tableYesA table in the database, as schema.table or just table (public is assumed). It needs a single-column primary key.
instructionNoWhat counts as related, in a sentence. Optional.
min_confidenceNo
idempotency_keyNoReplaying the same key returns the original result instead of acting twice. Strongly recommended for anything that creates a resource or spends money.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior3/5

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

Strong disclosure that every suggestion is stored as a proposed edge that search and traversal ignore until approved, that nothing is applied automatically, that row columns are sent to llm11, and that the dry run estimates rows and cost. These go well beyond the annotations. Contra the cost point, annotations declare idempotentHint=false, yet the tool spends money and creates proposals, so the definition would benefit from stating whether re-running with the same idempotency_key truly avoids duplicate spend.

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?

Front-loaded with purpose, then mechanism, then safety/cost, then data egress. Dense but every sentence carries information. Slightly run-on in the middle; the cost note about dry run could sit with the other safety sentence.

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?

An 11-parameter, LLM-backed, cost-incurring operation with no output schema, and the description covers the key risks: nothing auto-applied, proposals hidden from search/traversal, data sent to a model, and a dry-run cost estimate. Missing only return shape of proposals (count, confidence distribution) and how min_confidence interacts with stored suggestions.

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 coverage is 91%, so the baseline is 3, and the description adds real meaning beyond it: the limit applies to from_table rows only, both tables must support semantic search, the chosen columns are what gets sent to llm11, and the dry run reports row counts and approximate cost. min_confidence and instruction still rely entirely on the schema.

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?

States a specific verb and resource: 'Proposes edges between rows of two tables that no column connects.' The qualifying clause (no column connects) makes it immediately distinguishable from database_edge_upsert, which only approves edges.

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 condition for use is embedded in the purpose ('tables that no column connects') and the approval path is routed to database_edge_upsert explicitly. It also flags the prerequisite that both tables need semantic search. It stops short of stating when not to use it, e.g. when a real foreign key already exists and a traversal would suffice.

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.

Resources