Skip to main content
Glama

List relationships

list_relationships
Read-onlyIdempotent

List relationships so you can inspect the real join graph before editing it. A relationship runs between two addresses — an entity and a path on each side — and the two ends may be in different datasources and answer in different shapes; a foreign key is one instance of that. Lists across all datasources by default; pass 'datasource' to scope to a single datasource, and a relationship that spans two appears on both. Each end carries its datasource_id/datasource_name. Returns semantic relationship_type separately from provenance (source, last_edit_source, effective_source).

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "list_relationships"
  }
}

Input Schema

NameRequiredDescriptionDefault
typeNoOptional relationship type filter: 'fk', 'inferred', 'manual', or 'review'.
entityNoOptional exact entity name filter. Matches either end of the relationship.
datasourceNoOptional datasource ID to scope the listing to a single datasource. Omit to list relationships across all datasources. A datasource that has not finished setup is refused with datasource_not_ready.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive), yet the description still adds real behavioral detail: default all-datasource scope, the fact that a relationship spanning two datasources appears on both, that each end carries datasource_id/datasource_name, and that semantic relationship_type is returned separately from provenance sources. The datasource_not_ready refusal is also surfaced. Missing only things like pagination or result ordering.

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 intent, then domain definition, then scoping rules, then return semantics — a logical order with no filler sentences. It is dense and slightly long, but every clause conveys a distinct fact an agent would otherwise have to guess.

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?

There is no output schema, so the description carries the burden of describing returns, and it does so by explaining the entity/path end structure and the relationship_type-vs-provenance split. For a three-parameter, filter-only listing tool with full annotation coverage, that is close to complete; only ordering/pagination and result volume are left unstated.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents all three parameters, including the enum values for 'type' and the either-end matching for 'entity'. The description reinforces the datasource default and adds the non-obvious consequence that a spanning relationship duplicates across both sides, but otherwise restates schema meaning rather than extending it. Baseline 3 fits.

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?

States a specific verb and resource ('List relationships') and immediately frames the intent ('inspect the real join graph before editing it'), then defines what a relationship actually is: two addresses, an entity and a path on each side. It never names the sibling it complements (e.g. create_relationship), so differentiation from siblings is implied by 'before editing it' rather than explicit.

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 clear context for use and a concrete default/override rule: lists across all datasources by default, pass 'datasource' to scope. The inspection-before-editing framing tells the agent when this tool is the right entry point. No explicit when-not-to-use or named alternative, which keeps it short of a 5.

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