Skip to main content
Glama

End a relation

end_relation
DestructiveIdempotent

Mark a relation as no longer true by setting its end date.

The relation stays in history (query_world_model with
aspect="historical_state") and no longer appears in the current state.
Fails if the relation is already closed or if valid_until is earlier than
its start date. For works_for, reports_to and located_in changing to a new
target, relate_entities with supersede_previous=True closes the previous
one instead.

Args:
    relation_id: Relation id (from query_world_model or
        get_entity_relations).
    valid_until: ISO 8601 date from which it stopped being true.
    evidence_ref: Required source for the change (URL, person, document,
        or episode id).

Input Schema

NameRequiredDescriptionDefault
relation_idYes
valid_untilYes
evidence_refYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, but the description adds real context beyond them: the relation is retained in history and disappears only from current state, the call fails if already closed or if valid_until precedes the start date, and a source citation is mandatory. Minor tension: idempotentHint=true while a repeat call on a closed relation fails, which the description does not reconcile.

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?

Front-loads the action, then the persistence consequence, then failure conditions, then the alternative tool, then parameters. No sentence is filler and the routing advice is placed where an agent will read it before acting.

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?

With no output schema, the description takes responsibility for describing the outcome (historical retention vs current state), the failure modes, and the required evidence – everything needed to invoke correctly. Only the ambiguous idempotency behavior remains unaddressed.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must carry all three parameters – and it does: relation_id's provenance (query_world_model or get_entity_relations), valid_until's ISO 8601 format and start-date constraint, and evidence_ref's accepted forms (URL, person, document, episode id).

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 plus the mechanism ('setting its end date') and the semantic effect (relation becomes no-longer-true). It is clearly distinguishable from create_relation, relate_entities, and ratify_relation.

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?

Explicitly routes the agent elsewhere for the tricky case: for works_for/reports_to/located_in changes to a new target, use relate_entities with supersede_previous=True instead. It also states the two conditions under which this tool fails, so the agent can pre-validate.

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