Skip to main content
Glama
xunji-private-mcp

xunji-private-mcp

by Vdk1639

upsert_training

DestructiveIdempotent

Create up to four same-day training records or patch existing ones after confirmation. Provide datestr and movements for new entries, use localid with changed fields for updates, and reuse client_request_id on retries.

Instructions

Create or patch up to four same-day trainings, after the user's confirmation.

Provide datestr and movements for new records. Use localid for updates and include only changed fields. If movements are supplied for an update they replace the entire list, including unfinished sets. Use verified Chinese movement names and reuse client_request_id when retrying the same write.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "trains": "<trains>",
      "client_request_id": "<client_request_id>"
    },
    "name": "upsert_training"
  }
}

Input Schema

NameRequiredDescriptionDefault
trainsYes
client_request_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already flag destructiveHint and idempotentHint, but the description adds the concrete mechanics behind both: update movements replace the entire list including unfinished sets, and client_request_id should be reused on retry. The confirmation requirement is also disclosed. Missing is any statement of partial-failure behavior when creating multiple trainings.

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?

Four short sentences, front-loaded with the operation and its constraint, then the create/update rules, then the destructive replacement warning, then the retry note. No filler or restated title.

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 destructive, no-output-schema write with an untyped nested payload, the description supplies the essential prerequisites, field semantics, replacement behavior and idempotency key guidance. Remaining gaps — return shape and behavior on the fifth training or on partial failure — are modest.

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 0% and the trains item schema is an untyped additionalProperties object, so the description carries the load — and it does, naming datestr, movements, localid and client_request_id and their create-vs-update roles. It stops short of describing the shape of a movement entry or how many trains per element, leaving some ambiguity.

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 pair ('create or patch') plus resource ('same-day trainings') and a hard limit ('up to four'). The 'same-day' scoping and upsert semantics distinguish it cleanly from read siblings like get_training and from the other upsert_* tools that target body metrics or food.

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?

Gives explicit branch conditions: datestr+movements for new records, localid for updates with only changed fields, plus the precondition of user confirmation. It does not name an alternative tool or state when-not to use it, which keeps it short of a 5.

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