Skip to main content
Glama

Set a transaction's category

well_set_transaction_category

Set ONE transaction's category — the write that clears a categorization gate.

REQUIRED: transaction_id, from well_list_uncategorized_window. category — the LABEL, exactly as that read returned it on the row's suggestion, or another label from the closed list this schema carries. The vocabulary is fixed: there is no free-text category and no way to mint one.

decision records HOW the category was chosen, and it changes what the row keeps.

  • accepted_classifier_suggestion — the user affirmed the label the classifier had already put on the row. The row keeps category_source: "classifier" and its confidence score, and the affirmation is stamped as category_confirmed_at. Send this ONLY when the label equals the classifier's own stored suggestion.

  • user_choice — the user picked the label themselves. The row records category_source: "user" with no score.

The server verifies an accepted_classifier_suggestion claim against the row it is writing and downgrades it to user_choice when the stored suggestion is not that label, so the claim can never manufacture classifier provenance. Omitting decision is a user_choice.

A row from well_list_uncategorized_window never qualifies for the affirmation. That read returns rows carrying NO category at all, so there is no stored classifier value to affirm and the claim would be downgraded every time. Its categorySuggestions are PENDING proposals, not a stored category. Clearing that gate is always a user_choice; the affirmation exists for a surface that lists rows the classifier already categorized.

Categorizing a row does NOT move it in or out of the internal-transfer rule — that rule counts payment-means legs and no label affects it. What a category DOES change is exemption matching: an uncategorized row can never be matched by an exemption and always stays in a sum.

One transaction per call. The rows are decided independently and each one is saved as the user decides it.

When the token authorizes one workspace, call this directly — no other tool call is needed first. When it authorizes several, this read will not guess which one you mean: pass workspace_id on the call.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
categoryYesThe category label to store. Must be one of the labels in this list.
decisionNoHow the user arrived at the label. Omit for a user choice. See the description before sending accepted_classifier_suggestion.
workspace_idNoTarget workspace. Omit when the token authorizes one workspace. Required when it authorizes several — a write lands in exactly one workspace and this call would not say which.
transaction_idYesThe transaction to categorize, from well_list_uncategorized_window.
conversation_idNoThe conversation id returned by the previous Well result, in its meta under well/conversation_id, in its structuredContent, or in its JSON text block. Pass it back on every call in the same conversation, including a call a card makes, so the chosen workspace and the earlier answers still apply. It decides the conversation on its own: nothing the host states about the session replaces it. Omit it only on the first call of a conversation.
idempotency_keyNoOptional client-supplied key. A retried write with the same key returns the original result instead of re-applying the operation.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNo
successYes
categoryNoThe label stored on the row after the write.
transaction_idNo
category_sourceNoProvenance the server settled on: "classifier" when it accepted the affirmation claim, "user" when the caller picked the label or the claim was downgraded.
conversation_idNoThe conversation this result belongs to. Pass it back as the conversation_id argument on every later Well call in the same conversation.
category_confidenceNoThe classifier's score, preserved only on an accepted affirmation. Null on a user choice.
conversation_id_noteNoPresent only when the server opened a fresh lane, stating that no choice recorded earlier was read.
conversation_id_sourceNoWhere the conversation id came from: the host's own request meta, the caller's argument, or a fresh lane the server opened.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • addedInput schema / properties / conversation_id
      Added value: +{
      +  "description": "The conversation id returned by the previous Well result, in its meta under well/conversation_id, in its structuredContent, or in its JSON text block. Pass it back on every call in the same conversation, including a call a card makes, so the chosen workspace and the earlier answers still apply. It decides the conversation on its own: nothing the host states about the session replaces it. Omit it only on the first call of a conversation.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / conversation_id
      Added value: +{
      +  "description": "The conversation this result belongs to. Pass it back as the conversation_id argument on every later Well call in the same conversation.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / conversation_id_note
      Added value: +{
      +  "description": "Present only when the server opened a fresh lane, stating that no choice recorded earlier was read.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / conversation_id_source
      Added value: +{
      +  "description": "Where the conversation id came from: the host's own request meta, the caller's argument, or a fresh lane the server opened.",
      +  "enum": [
      +    "host_meta",
      +    "argument",
      +    "minted"
      +  ],
      +  "type": "string"
      +}
  2. Added

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already indicate readOnlyHint=false and destructiveHint=false, but the description adds substantial behavioral depth: the server verifies and downgrades accepted_classifier_suggestion claims, omitting decision defaults to user_choice, categorization does not affect the internal-transfer rule, and it changes exemption matching. It also clarifies workspace-scoping behavior and idempotency, all beyond what the annotations express. No contradiction with annotations.

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 long but well-structured: it front-loads the core purpose, uses bolded sections for decision semantics and key restrictions, and every sentence carries useful information. The length is justified by the tool's complexity, though a few phrases could be tightened (e.g., the final workspace guidance uses 'this read' for a write tool, a minor wording slip).

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?

Given the tool's complexity and the presence of an output schema, the description is complete: it covers where transaction_id comes from, the closed vocabulary and no-free-text rule, decision verification and downgrade behavior, the interaction with the internal-transfer rule and exemption matching, workspace authorization, idempotency, and conversation continuation. No critical behavior needed to invoke the tool correctly is missing.

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 coverage is 100%, but the description adds rich parameter-level meaning: transaction_id must come from well_list_uncategorized_window, category must be the exact label as returned, decision semantics are fully explained (including when the claim gets downgraded), workspace_id is tied to token authorization scope, and conversation_id and idempotency_key behaviors are clarified. This goes well beyond the schema field descriptions.

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 opening sentence states a specific verb, resource, and scope: 'Set ONE transaction's category — the write that clears a categorization gate.' It clearly distinguishes itself from sibling tools like well_set_transaction_ledger_account by narrowing to category rather than ledger account, and explicitly limits to a single transaction per call.

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?

The description gives clear context on when to call the tool: transaction_id must come from well_list_uncategorized_window, and it explicitly says to call directly when the token authorizes one workspace, and to pass workspace_id when it authorizes several. It also details when to use accepted_classifier_suggestion vs user_choice. However, it does not explicitly name alternative sibling tools (e.g., well_set_transaction_ledger_account) or state 'don't use this for ledger accounts,' so the differentiation is implicit rather than fully explicit.

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