Skip to main content
Glama

telys_upsert

Idempotent

Insert new text entries and replace existing ones by external ID, persisting versioned updates so repeated calls converge without duplicates.

Instructions

Add-or-replace text rows by external id: new ids are inserted; existing ids are re-embedded and replaced as a versioned update (never a duplicate physical row), then persisted. Use when the caller owns the ids and a repeated call must converge instead of conflicting — this is the idempotent write path. Required: collection, texts, ids (explicit JSON null is treated as omitted = plain telys_add with generated ids). Optional: metadata (one object per text) and partition_by (default 'scope'; the collection is auto-created when absent). Fails on ids/texts length mismatch.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idsYes
textsYes
metadataNo
collectionYes
partition_byNoscope

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

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

The description goes beyond the idempotentHint annotation by detailing that existing ids are 're-embedded and replaced as a versioned update (never a duplicate physical row)' and that the collection is auto-created. It also discloses the failure condition on length mismatch. While it doesn't cover every conceivable side effect, it meaningfully supplements the annotations without contradicting them.

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?

The description is dense but well-organized, with a clear core behavior statement followed by usage context and explicit required/optional sections. Every sentence adds value, though the length is slightly more than minimal due to the detailed idempotency and fallback explanations.

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?

For a 5-parameter mutation tool with no output schema, the description covers required/optional semantics, error conditions, and fallback behavior. It doesn't specify the return value, but that's not essential for invocation. Overall, it gives enough context for an agent to call it correctly.

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 fully compensates. It explains the role of each parameter: collection, texts, ids (required), metadata as 'one object per text', partition_by with default 'scope' and auto-creation, and the special behavior of JSON null ids. It also clarifies the length-matching constraint between ids and texts.

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 clearly states the tool does 'add-or-replace text rows by external id' and differentiates new vs. existing ids, explicitly calling it the 'idempotent write path'. It also distinguishes itself from telys_add by noting that explicit JSON null ids fall back to telys_add with generated ids, so the purpose is unambiguous and distinct from siblings.

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?

Provides explicit when-to-use guidance: 'Use when the caller owns the ids and a repeated call must converge instead of conflicting'. It also explains the fallback to telys_add when ids are omitted, and notes the collection is auto-created when absent, giving the agent clear decision context.

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