Skip to main content
Glama

Payment graph: nodes and payer→payee edges

get_graph
Read-only

Entities as nodes and settlements aggregated into edges, over a bounded window. Two window forms, and exactly one may be sent: window=N is a row count running to the live tip (briefly cacheable); days=N covers whole UTC days only, excluding today, so an answer is stable for the day. Use days for anything an agent will cache. Self-payments are excluded from BOTH edges and node totals and counted in meta.excluded, so sum(node.window_usd) is exactly twice sum(edge.usd).

Wraps GET /v0/graph. Access: requires an API key (Authorization: Bearer rh_live_… or x-api-key).

Returns:

  • applied: Every parameter as APPLIED, not as requested — both windows, the edge cap, the facilitator caps, the chain, the filters. Read this rather than assuming the request was honoured verbatim. days and window can BOTH be non-null: a wallet-focused day window is read row by row, so a row cap applies inside the declared range and complete says whether it bit.

  • complete: Whether the declared window was read in full. False means a row cap stopped the read inside the range — the response then covers the newest applied.window settlements in it, not the whole of it, and meta.warnings says so. Only ?days= with ?wallet= can be false.

  • days: The whole-UTC-day window applied, or null on the window=N path.

  • since: Inclusive start of the day window, or null on the window=N path.

  • until: Exclusive end of the day window (midnight today), or null on the window=N path.

  • since_day: The since bound as a UTC date, or null.

  • until_day: The until bound as a UTC date, or null.

  • mode: daily when the answer came from the per-day rollup, which covers the window exactly; raw when it was folded from settlement rows.

  • bucket: What one source row represented: day under mode: daily, settlement under raw.

  • truncated: True when the edge cap dropped edges the window contained.

  • nodes: One entry per wallet: role, display name, ENS, and its window totals.

  • edges: Aggregated payer→payee pairs with volume and count.

  • series: Per-day bucket totals across the window. null on the window=N path, which is a row count with no day grain to bucket into.

  • facilitators: Relayers seen in the window, largest first and capped to applied.facilitators. usd/count are the relayer's own window totals; links name only wallets present in nodes, capped to applied.facilitator_links, with links_total and links_truncated beside them.

  • window: How the window was read: rows requested, fetched and used.

  • meta: The chain served, as_of, and excluded — the self-payments, low-confidence rows, over-cap edges and over-cap facilitators the window held but the graph does not show, so node and edge totals can be reconciled. below_min_usd is null when min_usd was sent: that filter runs at read time, so its exclusions never reach this response and cannot be counted.

Input Schema

NameRequiredDescriptionDefault
viaNoRestrict to settlements relayed by this facilitator key or wallet.
daysNoWhole UTC days, excluding today, honoured exactly: `days=1` is one day. Mutually exclusive with `window`. Out of `[1,180]` is refused rather than clamped.
chainNoCAIP-2 chain id. Defaults to the chain this deployment indexes (`eip155:8453` in production, `eip155:84532` on staging) — the same default every endpoint on this API uses. A chain the index does not carry is refused with 400 listing the supported set, never answered with an empty list.
edgesNoHard cap on edges returned, highest volume first. Honoured exactly; `truncated` says whether it bit.
walletNoRestrict to edges touching this wallet. Must be a well-formed EVM address (case-insensitive) or Solana address (base58, case-sensitive).
windowNoRow count back from the live tip. Mutually exclusive with `days` — sending both is refused with 400, not silently resolved in favour of one.
min_usdNoDrop settlements below this USD value.
min_probabilityNoMinimum x402 confidence, in `[0,1]`. Default 0.5.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior5/5

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

The description adds substantial behavioral context beyond the annotations: it states API-key auth requirements, cacheability differences between window forms, stability of whole-UTC-day windows, self-payment exclusion, applied-vs-requested semantics, `complete` semantics, truncation behavior, and how `meta` supports reconciliation. These details materially help an agent predict how the tool behaves and interpret its results.

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 description is front-loaded with the core concept and then structured into a clear Returns section, which is appropriate given the absence of an output schema. It is still quite long and revisits some window semantics in both the opening and the return-field explanations, so it is not maximally concise.

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 complex graph tool with eight parameters and no output schema, the description is complete: it covers purpose, window semantics, auth, key output fields, truncation, exclusions, and reconciliation caveats. An agent has enough information to call it correctly and interpret the response without additional documentation.

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 100%, so the parameters are already well documented, but the description adds operational meaning around choosing `days` for cacheable answers versus `window=N` for a row count to the live tip. It also reinforces mutual exclusivity and explains how a row cap can apply inside a day window, which goes beyond the raw schema descriptions.

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?

The description clearly states that it returns a payment graph: entities as nodes and aggregated settlements as payer→payee edges over a bounded window, and it identifies the wrapped endpoint GET /v0/graph. It is specific about the resource and scope, but it does not explicitly differentiate itself from sibling tools such as list_entity_settlements or list_flows.

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?

Guidance is mostly implied by the graph-oriented purpose and by the explicit 'Use `days` for anything an agent will cache' note, which helps choose between the two window modes. However, it does not say when to use get_graph instead of sibling tools like list_entity_settlements, list_flows, or run_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