Skip to main content
Glama

Upsert Edge

upsert_edge

Create or update a single dependency-graph edge between source and destination nodes, setting type, weight, and origin while preserving manual links through reindexing.

Instructions

Create or update one edge. weight/origin default from the edge type (see graph.weights) when omitted -- pass origin='manual' explicitly when in doubt; that is the one origin a reindex never overwrites.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dstYes
srcYes
typeYes
vaultNo
originNo
sourceNo
weightNo
confidenceNohigh

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior4/5

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

With no annotations present the description carries the full burden, and it delivers genuinely useful behavior: upsert (create-or-update) semantics, weight/origin defaulting from the edge type via graph.weights, and the non-obvious invariant that origin='manual' survives a reindex. It omits permissions, conflict resolution, and error behavior, but covers more than the schema does.

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?

Two front-loaded sentences with no filler; the purpose leads and the operational caveat follows. The graph.weights cross-reference is slightly dense but earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Output schema covers return values and the description handles purpose and defaulting, but for an 8-parameter mutation tool with 0% schema coverage and no annotations, the definition leaves most parameters and the write's side effects/authorization unexplained.

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

Parameters2/5

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

Schema coverage is 0% across 8 parameters, yet the description only explains weight and origin (their defaulting behavior). Six parameters (src, dst, type, vault, source, confidence) receive no semantic elaboration anywhere, so the description does not compensate for the coverage gap.

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+resource ('Create or update one edge') and the 'one edge' scope implicitly distinguishes it from the bulk upsert_edges sibling. It does not name the sibling explicitly, but the capability is unambiguous.

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

Usage Guidelines3/5

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

It offers conditional guidance for the origin parameter ('pass origin=manual when in doubt'), but gives no tool-level when-to-use guidance such as when to pick this over upsert_edges or a note-sync path. Usage is implied rather than stated.

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