Skip to main content
Glama

database_graph_traverse

Read-only

Starts at a row (start.table and start.pk) or at the best matches for some words (start.table and start.query, on a table with semantic search) and follows relationships outwards, returning every row reached with the path that reached it. It runs as one recursive SQL statement under the Product's own role, with a 5 second timeout, cycles cut, at most 4 hops, at most 50 neighbours per row per hop and at most 500 rows, so it cannot run away with a shared database. Read-only.

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>",
      "start": "<start>"
    },
    "name": "database_graph_traverse"
  }
}

Input Schema

NameRequiredDescriptionDefault
startYes
stepsNoA fixed path, one entry per hop, e.g. [{"via": "fk:orders_customer_id_fkey", "dir": "in"}]. via is fk:<constraint>, vfk:<id> or edge:<label>, as database_graph_schema lists them. Omit to follow every relationship up to max_depth.
fanoutNoMost neighbours taken from any one row at any one hop. At most 50.
max_depthNoHops to follow when steps is omitted. At most 4.
max_nodesNoMost rows returned in total. At most 500.
productIdYesProduct identifier, e.g. prd_7k2m9x4qw1nv8bz3ct6d.
databaseIdYesDatabase identifier, from product_get or database_get.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the readOnly/destructive annotations, the description discloses major behavioral constraints: one recursive SQL statement, execution under the Product role, 5 second timeout, cycle cutting, depth/fanout/row caps, and read-only behavior. These details materially help an agent predict safety and limits.

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?

The description is front-loaded with the operation and start modes, then gives execution limits and read-only status. Despite a dense second sentence, every clause conveys operationally relevant information.

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?

For a complex nested-parameter traversal tool with no output schema, the description adequately explains inputs, returned rows with paths, and safety limits. It could say slightly more about the response shape, but the essentials for correct invocation are present.

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 high at 86%, but the description adds useful semantics: start.table can be schema-qualified, start.query requires a table with semantic search, steps defines a fixed path with supported via forms, and omitting steps changes traversal behavior. It also explains that step where filters apply before ranking.

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 operation: start from a row via start.table/start.pk or semantic matches via start.table/start.query, follow relationships outward, and return every reached row with its path. It clearly distinguishes traversal from ordinary querying or schema inspection.

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?

It explains the two starting modes and notes that omitting steps follows every relationship up to max_depth, while fixed paths use fk/vfk/edge identifiers as database_graph_schema lists them. It does not explicitly contrast when to choose this over database_query or database_search, but the traversal use case is clear.

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