Skip to main content
Glama

upsert_collection

Add or update an authenticated user's Bangumi collection entry for a subject, including rating, comment, tags, privacy, and episode or volume progress.

Instructions

Add or update the authenticated user's collection for a subject (POST/PATCH /v0/users/-/collections/{subject_id}).

Requires BANGUMI_ACCESS_TOKEN. Does not auto-retry on network timeout.

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": {
      "subject_id": "<subject_id>"
    },
    "name": "upsert_collection"
  }
}

Input Schema

NameRequiredDescriptionDefault
rateNo
tagsNo
commentNo
privateNo
ep_statusNo
subject_idYes
vol_statusNo
collection_typeNo
create_if_missingNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false and openWorldHint=true, and the description adds genuinely useful behavior beyond that: it requires BANGUMI_ACCESS_TOKEN and explicitly does not auto-retry on network timeout, which matters for a non-idempotent-feeling mutation. It does not explain what happens to existing fields on update (overwrite vs merge), so a small gap remains.

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?

Three short sentences, with the core purpose stated first and the operational caveats after; nothing is padded. The endpoint parenthetical is extra but cheap and useful for API-literate agents.

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

Completeness2/5

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

For a nine-parameter mutation with no output schema and no annotation detail on side effects, the description leaves too much unanswered: what an upsert does to unspecified fields, how create_if_missing=false fails, and what the returned collection looks like. Auth and retry are covered, but the operational core is not.

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 description coverage is 0% across nine parameters, yet the description explains none of them - no meaning for rate scale, tags, private, ep_status, vol_status, collection_type, or create_if_missing. Only subject_id is indirectly clarified by its presence in the URL path. This is the definition's largest shortfall.

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?

The description gives a specific verb pair ('add or update') plus the resource ('the authenticated user's collection for a subject') and even the HTTP endpoints, so an agent can tell it targets subject collections rather than the sibling character/index/person collection tools. It stops short of naming those siblings explicitly, which keeps it from a 5.

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

Usage Guidelines2/5

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

There is no when-to-use or when-not-to-use guidance: nothing says when upserting is preferable to checking collections first (check_user_collections), or how create_if_missing changes the decision. Only the implicit constraint 'authenticated user' narrows applicability.

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