Skip to main content
Glama

get_relation_graph

Read-onlyIdempotent

WHEN: you need the COMPLETE bidirectional relation graph for an object in ONE call. Triggers: 'relations of', 'FK of', 'what tables link to', 'quelles tables liées à', 'avant de générer du code', 'before generating code', 'foreign keys', 'delete actions', 'who references', 'qui référence', 'graph de relations'. Returns ALL outgoing edges (FK relations, DeleteActions, DataSources, Extensions, Security...) AND all incoming back-references (forms, entities, CoC classes, privileges... that reference it). Backed by the pre-computed relation index -- O(1) lookup, no vector scan. Much faster and more complete than find_related_objects for known object names. ALWAYS call this before generating code that touches multiple objects or requires join logic. Use find_related_objects when the relation index is not yet built (fallback to vector scan).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
maxEdgesNoMaximum edges to show per direction (default: 200, max: 500)
objectNameYesThe exact object name, e.g. 'SalesTable', 'CustTable', 'SalesFormLetter'
aotTypeFilterNoOptional: filter edges by relation kind to reduce noise. Comma-separated. Examples: 'TableFK', 'DeleteAction', 'Extension', 'DataSource', 'Security'. Leave empty for all kinds.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added
  2. Removed
  3. First observed

TDQS

A4.2/5.0
Behavior3/5

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

Annotations already establish readOnly, idempotent, non-destructive behavior, so the bar is lower. The description adds useful context about the pre-computed relation index, O(1) lookup, and the categories of outgoing and incoming edges. However, it claims the result is 'ALL' and 'COMPLETE' while the schema caps maxEdges at 200/500 per direction, and the description does not qualify that limitation, slightly overstating the tool's behavior.

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?

Although the description is longer than average, every segment earns its place: the WHEN trigger, the multilingual trigger phrases, the return scope, the pre-computed index rationale, the ALWAYS rule, and the fallback tool. It is front-loaded with the most decision-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?

Since there is no output schema, the description compensates by enumerating the types of outgoing edges and incoming back-references, giving an agent a clear expectation of results. It also covers the fallback to find_related_objects. It loses a point because it does not reconcile 'ALL' with the maxEdges cap or describe the graph response structure.

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 coverage is 100%, and each parameter already has a detailed description with examples and defaults. The description adds no parameter-specific semantics beyond triggering context and performance rationale, so it earns the baseline 3.

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: 'get the COMPLETE bidirectional relation graph for an object in ONE call.' It clearly distinguishes itself from find_related_objects by naming what it returns and why it is faster/more complete, so there is no ambiguity about its purpose.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It provides an explicit 'WHEN:' statement, trigger phrases, and an unconditional rule: 'ALWAYS call this before generating code that touches multiple objects or requires join logic.' It also names the exact fallback alternative: 'Use find_related_objects when the relation index is not yet built.'

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.