Skip to main content
Glama

audit_link

Read-only

Check a declared join against the real data before trusting a query built on it. Give two table ids; each link between them is audited separately, labelled by its columns. The same id twice audits a table's self-links (there from is the link's first column: read from_columns).

max_fanout above 1 on both sides is a many-to-many that multiplies rows. orphans are what an INNER JOIN drops and a LEFT JOIN turns to NULLs; null_keys never match. Each side lists up to 50 offending key values, most rows first, to name to the user. from is table_id's side. A link whose column is gone or whose types no longer match returns unauditable with no counts: that is the finding, not an error.

lens: released audits the published cuts viewers see. If served mixes live and released, say so: orphans may just be the two sides at different times.

Each audit scans both tables in full, so at most 3 links are audited per call; not_audited lists the rest, and from_columns/to_columns pick one.

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": {
      "table_id": "<table_id>",
      "to_table_id": "<to_table_id>"
    },
    "name": "audit_link"
  }
}

Input Schema

NameRequiredDescriptionDefault
lensNo`live` (default) or `released`.
table_idYesOne side of the join. Either order works.
to_columnsNoThe far side's columns, positionally paired with `from_columns`.
to_table_idYesThe other side — the table you want to join it against, or the same id again to audit that table's self-links.
from_columnsNoNarrow to one link when the two tables have several. Column ids from `describe_table.links[].from_columns`, in that order.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the readOnlyHint annotation, it discloses cost and limits (full scan of both tables, max 3 links audited per call, remaining surfaced in not_audited), return semantics (up to 50 offending key values, most rows first; unauditable with no counts is a finding, not an error), and the lens behavior. This is exactly the kind of operational context annotations cannot carry.

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?

Purpose and the two-id calling convention are front-loaded, then interpretation of results, limits, and edge cases follow in a logical order. It is dense and backtick-heavy but nearly every sentence carries actionable information; a small amount of compression could still tighten it.

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 non-trivial analytical tool with no output schema, the description supplies everything an agent needs: what a call returns, how to read each outcome (fanout, orphans, null_keys, unauditable, not_audited), the 3-link cap, and the lens caveat. Nothing material for correct invocation is missing.

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 baseline is 3, but the description adds real meaning: passing the same id twice audits self-links where `from` is the link's first column, `from` always refers to table_id's side, and from_columns/to_columns select a single link. It reinforces the released-lens semantics rather than merely restating field descriptions.

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 concrete verb and resource — audit a declared join between two tables against real data before trusting a query — and clarifies that each link is audited separately, labelled by its columns. This is distinguishable from siblings like describe_table or run_sql, and it even points at describe_table.links[].from_columns for input sourcing.

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?

Gives a clear when-to-use: before relying on a join, to detect fanout, orphans and null keys. It explains interpretation branches (max_fanout>1 = row-multiplying many-to-many, orphans = what INNER drops / LEFT nullifies) and warns about the served/lens timing caveat. It stops short of naming an explicit alternative tool or a when-not-to-use condition.

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