Skip to main content
Glama

Связи объекта

get_relations
Read-onlyIdempotent

Retrieve outgoing and incoming relations for an object, grouped by field with counts, to identify what it references or what references it.

Instructions

Когда вызывать: нужны связи объекта — outgoing (на что он ссылается) и incoming (кто ссылается на него: подсистемы — incoming is_part_of, компоненты — incoming realizes_system, таблицы — incoming system). Возвращает группы по полю с count, до limit элементов и title. У крупных объектов сужайте direction/field. Дальше: get_entity на связанном id.

Input Schema

NameRequiredDescriptionDefault
idYesID объекта, например example.app_system.hotel_booking
fieldNoТолько связи по этому полю, например is_part_of
limitNoЭлементов на группу (по умолчанию 20)
directionNoпо умолчанию both

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint/idempotentHint/destructiveHint=false, so safety is covered; the description adds the return shape (groups by field, count, title) and — crucially — discloses truncation ('до limit элементов') and that large objects need narrowing. It does not say how to paginate past the limit, which is the main remaining gap.

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 the trigger phrase, then return shape, then narrowing advice, then the next step — a well-ordered chain of sentences. The enumerated subsystem/component/table relation examples are slightly verbose but they carry real domain value.

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?

With no output schema, the description carries the burden of describing returns and does so (field groups, counts, titles, per-group truncation) for a 4-parameter read tool. Missing only edge-case behavior — nonexistent id, empty results, and how to fetch beyond the limit.

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 would be 3; the description earns extra by explaining direction as outgoing/incoming semantics and by establishing that limit is per-group, not total. It still does not spell out what 'both' merges or how group ordering works.

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 specific verb+resource (fetch an object's relations) and disambiguates the two directions with concrete domain examples: outgoing = what it references, incoming = who references it (subsystems via is_part_of, components via realizes_system, tables via system). An agent can distinguish this from find_relation_paths or get_entity on the name alone.

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?

Opens with an explicit trigger ('Когда вызывать: нужны связи объекта'), gives a mitigation for the large-object case ('сужайте direction/field'), and a follow-up step ('Дальше: get_entity на связанном id'). It never names a sibling alternative or a when-not condition, so it falls short of full routing guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.