Skip to main content
Glama

Execute a SELECT against the Engagement Graph

traverse_graph
Read-onlyIdempotent

[Read · free] Executes a TS-validated SELECT-only SQL query against the engagement graph and returns rows. Needs the schema and the caller_user_ids / caller_tracked_lp_ids that traverse_graph_help returns (it also has canonical examples). Required: SQL must start with SELECT or WITH, contain no DML/DDL keywords, and reference one of your caller_user_ids or caller_tracked_lp_ids verbatim. Cap: 1000 rows, 5s statement timeout. Pure DB read — 0 credits.

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": {
      "sql": "<sql>"
    },
    "name": "traverse_graph"
  }
}

Input Schema

NameRequiredDescriptionDefault
sqlYesThe SELECT/WITH SQL to execute

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the readOnly/idempotent/non-destructive annotations, it discloses concrete operating limits: 1000-row cap, 5s statement timeout, SELECT/WITH-only enforcement, no DML/DDL, and the verbatim caller-id scoping requirement. It also confirms zero credit cost, which an agent needs before choosing between this and a dedicated query tool.

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 text is dense and front-loaded with the key constraints (cap, timeout, scoping) in a single block, with no wasted sentences. The only minor redundancy is stating the zero-cost/read-only status twice, once in the bracket tag and again at the end.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a single-parameter query tool with no output schema, the description covers invocation prerequisites, dialect constraints, result limits, timeout behavior, and cost. An agent has everything needed to decide to call it and to construct a valid query.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With only one parameter at full schema coverage, the baseline would be a 3, but the description adds real validation semantics the schema lacks: the query must start with SELECT or WITH, contain no DML/DDL keywords, and reference a caller_user_ids or caller_tracked_lp_ids value verbatim. Those constraints materially shape how the sql value must be constructed.

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 — executes a TS-validated SELECT-only SQL query against the engagement graph and returns rows. It is clearly distinct from traverse_graph_help, which it names as the schema source rather than a competitor.

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 explicitly states the prerequisite path: fetch the schema and caller_user_ids / caller_tracked_lp_ids from traverse_graph_help, which also holds canonical examples. That is strong routing guidance, though it never says when to prefer the purpose-built siblings (e.g. get_engagement_brief, get_engagement_trends) over hand-written SQL.

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