Skip to main content
Glama

Declare a counterparty's default transaction category

well_set_counterparty_default_category

Declare what spend at ONE counterparty is — asked once about the counterparty, instead of once per transaction.

REQUIRED: company_id, from well_list_counterparties. category — a LABEL from the closed list this schema carries. The vocabulary is fixed: there is no free-text category and no way to mint one.

This is the counterparty's DEFAULT, not one row's category. Every transaction of this counterparty categorized from here on takes the label without a model call.

It also reaches backward. The counterparty's existing transactions are relabelled too, in the background over the minutes or hours after the call. Rows a person answered are never touched: a transaction someone categorized or confirmed by hand keeps what they gave it. Tell the user a declaration rewrites the counterparty's history, so they are not surprised by it. To change ONE row instead, use well_set_transaction_category, which sets that transaction and leaves the counterparty alone.

A declaration is trusted at once. The other way a counterparty gets a default is by being taught: three corrections to the same category on three distinct transactions. A declaration skips that, because the person has already said what the answer is.

It overrides whatever the counterparty carried before, including a category the system had inferred from corrections and one an earlier declaration already wrote onto these same rows. A later transaction-level correction still wins over the declaration on the row it names, and teaches the counterparty that the default is wrong.

Do not declare a default for a counterparty whose spend has more than one nature. A marketplace or a cloud vendor selling hardware, compute and advertising to the same buyer has no single answer, and a declaration would state one. Leave those to the classifier and correct them per line.

Not for the workspace's own company. A default is about the other party; the server refuses it on the own company.

The list depends on the workspace. A personal space files household categories, a company workspace business categories, and both file the shared ones. A label outside the workspace's list writes nothing and returns refusal_reason with allowed_categories: send a label from that list.

When the token authorizes one workspace, call this directly — no workspace 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

NameRequiredDescriptionDefault
categoryYesThe category label spend at this counterparty defaults to. Must be one of the labels in this list.
company_idYesThe counterparty to declare a default for, from well_list_counterparties.
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.
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.
workspace_scopeNoRestrict this call to the family: the token's primary workspace plus the company workspaces under it that you are a member of. Unrelated authorized workspaces drop out of the read; row reads merge across the family, while a per-workspace figure still reports exactly one workspace.

Output Schema

NameRequiredDescriptionDefault
errorNo
successYes
categoryNoThe label the counterparty's default now carries.
company_idNo
company_nameNo
refusal_reasonNoSet when the category is not in this workspace's list. Nothing was written.
conversation_idNoThe conversation this result belongs to. Pass it back as the conversation_id argument on every later Well call in the same conversation.
newly_connectedNoTools that connected to this workspace since the last result and that no session was told about yet, oldest first. Present only when at least one tool is new. The connected-line rule says when to tell an entry; when it does, one line per entry, in the person's language: "<name> is connected.". Never fold several entries into one sentence. Each entry comes back once, on one result only: never repeat its line later.
allowed_categoriesNoWith refusal_reason: the categories this workspace files and is offered. Send `label` back; `name` is how the workspace shows it.
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. Changed1 schema field changed
    • changedInput schema / properties / category / enum
      Previous value: -[
      -  "Subscription & product revenue",
      -  "Services & implementation revenue",
      -  "Grants & subsidies (non-repayable)",
      -  "Research tax credit (CIR/CICE)",
      -  "Other operating income & cashback",
      -  "Employee salaries (net)",
      -  "Employer social charges",
      -  "Wage withholding remittance (PAS)",
      -  "Employee benefits & insurance",
      -  "Recruiting & hiring fees",
      -  "Engineering / product contractors",
      -  "Operations / GTM / other contractors",
      -  "Legal & corporate-secretarial fees",
      -  "Accounting, finance & advisory fees",
      -  "Other professional & consulting fees",
      -  "AI model / inference (cost of revenue)",
      -  "Hosting, infrastructure & data (cost of revenue)",
      -  "Developer & engineering software",
      -  "Business & productivity software",
      -  "Hardware & equipment",
      -  "Advertising & paid media",
      -  "Sales / marketing tools & lead-gen",
      -  "AI creative & content production",
      -  "Office rent & coworking",
      -  "Office supplies & general operations",
      -  "Travel & transport",
      -  "Meals & entertainment",
      -  "Team events & offsites",
      -  "Bank, FX & payment-processing fees",
      -  "Business insurance",
      -  "Corporate income tax",
      -  "Local & business taxes",
      -  "Other operating expense (residual)",
      -  "VAT receivable (input / refund)",
      -  "VAT payable (output)",
      -  "Treasury placement (out)",
      -  "Treasury redemption (in)",
      -  "Investment & interest income",
      -  "Equity proceeds & raise costs",
      -  "Loan drawdowns & repayments",
      -  "Repayable public advances",
      -  "Realised FX gain / loss",
      -  "Inter-account transfer (same entity)",
      -  "Inter-company transfer (own entities)",
      -  "FX conversion principal",
      -  "Uncategorised / suspense",
      -  "Groceries",
      -  "Rent & mortgage",
      -  "Energy, water, internet & phone",
      -  "Health",
      -  "Personal insurance",
      -  "Shopping & clothing",
      -  "Leisure, culture & sport",
      -  "Subscriptions & streaming",
      -  "Childcare & education",
      -  "Gifts & donations",
      -  "Personal taxes",
      -  "Cash withdrawals",
      -  "Salary",
      -  "Other income",
      -  "Other household expenses"
      -]New value: +[
      +  "Subscription & product revenue",
      +  "Services & implementation revenue",
      +  "Grants & subsidies (non-repayable)",
      +  "Research tax credit (CIR/CICE)",
      +  "Other operating income & cashback",
      +  "Employee salaries (net)",
      +  "Employer social charges",
      +  "Wage withholding remittance (PAS)",
      +  "Employee benefits & insurance",
      +  "Recruiting & hiring fees",
      +  "Engineering / product contractors",
      +  "Operations / GTM / other contractors",
      +  "Legal & corporate-secretarial fees",
      +  "Accounting, finance & advisory fees",
      +  "Other professional & consulting fees",
      +  "AI model / inference (cost of revenue)",
      +  "Hosting, infrastructure & data (cost of revenue)",
      +  "Developer & engineering software",
      +  "Business & productivity software",
      +  "Hardware & equipment",
      +  "Advertising & paid media",
      +  "Sales / marketing tools & lead-gen",
      +  "AI creative & content production",
      +  "Office rent & coworking",
      +  "Office supplies & general operations",
      +  "Travel & transport",
      +  "Meals & entertainment",
      +  "Team events & offsites",
      +  "Bank, FX & payment-processing fees",
      +  "Business insurance",
      +  "Corporate income tax",
      +  "Local & business taxes",
      +  "Other operating expense (residual)",
      +  "VAT receivable (input / refund)",
      +  "VAT payable (output)",
      +  "Treasury placement (out)",
      +  "Treasury redemption (in)",
      +  "Investment & interest income",
      +  "Equity proceeds & raise costs",
      +  "Loan drawdowns & repayments",
      +  "Repayable public advances",
      +  "Realised FX gain / loss",
      +  "Inter-account transfer (same entity)",
      +  "Inter-company transfer (own entities)",
      +  "FX conversion principal",
      +  "Uncategorised / suspense",
      +  "Goods purchased",
      +  "Banking services",
      +  "Groceries",
      +  "Rent & mortgage",
      +  "Energy, water, internet & phone",
      +  "Health",
      +  "Personal insurance",
      +  "Shopping & clothing",
      +  "Leisure, culture & sport",
      +  "Subscriptions & streaming",
      +  "Childcare & education",
      +  "Gifts & donations",
      +  "Personal taxes",
      +  "Cash withdrawals",
      +  "Salary",
      +  "Other income",
      +  "Other household expenses"
      +]
  2. Changed1 schema field changed
    • changedOutput schema / properties / newly_connected / description
      Previous value: -"Tools that connected to this workspace since the last result and that no session was told about yet, oldest first. Present only when at least one tool is new. Start the reply with one line per entry, in the person's language: \"<name> is connected.\". Never fold several entries into one sentence. Each entry comes back once, on one result only: never repeat its line later."New value: +"Tools that connected to this workspace since the last result and that no session was told about yet, oldest first. Present only when at least one tool is new. The connected-line rule says when to tell an entry; when it does, one line per entry, in the person's language: \"<name> is connected.\". Never fold several entries into one sentence. Each entry comes back once, on one result only: never repeat its line later."
  3. Changed3 schema fields changed
    • changedInput schema / properties / category / enum
      Previous value: -[
      -  "Subscription & product revenue",
      -  "Services & implementation revenue",
      -  "Grants & subsidies (non-repayable)",
      -  "Research tax credit (CIR/CICE)",
      -  "Other operating income & cashback",
      -  "Employee salaries (net)",
      -  "Employer social charges",
      -  "Wage withholding remittance (PAS)",
      -  "Employee benefits & insurance",
      -  "Recruiting & hiring fees",
      -  "Engineering / product contractors",
      -  "Operations / GTM / other contractors",
      -  "Legal & corporate-secretarial fees",
      -  "Accounting, finance & advisory fees",
      -  "Other professional & consulting fees",
      -  "AI model / inference (cost of revenue)",
      -  "Hosting, infrastructure & data (cost of revenue)",
      -  "Developer & engineering software",
      -  "Business & productivity software",
      -  "Hardware & equipment",
      -  "Advertising & paid media",
      -  "Sales / marketing tools & lead-gen",
      -  "AI creative & content production",
      -  "Office rent & coworking",
      -  "Office supplies & general operations",
      -  "Travel & transport",
      -  "Meals & entertainment",
      -  "Team events & offsites",
      -  "Bank, FX & payment-processing fees",
      -  "Business insurance",
      -  "Corporate income tax",
      -  "Local & business taxes",
      -  "Other operating expense (residual)",
      -  "VAT receivable (input / refund)",
      -  "VAT payable (output)",
      -  "Treasury placement (out)",
      -  "Treasury redemption (in)",
      -  "Investment & interest income",
      -  "Equity proceeds & raise costs",
      -  "Loan drawdowns & repayments",
      -  "Repayable public advances",
      -  "Realised FX gain / loss",
      -  "Inter-account transfer (same entity)",
      -  "Inter-company transfer (own entities)",
      -  "FX conversion principal",
      -  "Uncategorised / suspense"
      -]New value: +[
      +  "Subscription & product revenue",
      +  "Services & implementation revenue",
      +  "Grants & subsidies (non-repayable)",
      +  "Research tax credit (CIR/CICE)",
      +  "Other operating income & cashback",
      +  "Employee salaries (net)",
      +  "Employer social charges",
      +  "Wage withholding remittance (PAS)",
      +  "Employee benefits & insurance",
      +  "Recruiting & hiring fees",
      +  "Engineering / product contractors",
      +  "Operations / GTM / other contractors",
      +  "Legal & corporate-secretarial fees",
      +  "Accounting, finance & advisory fees",
      +  "Other professional & consulting fees",
      +  "AI model / inference (cost of revenue)",
      +  "Hosting, infrastructure & data (cost of revenue)",
      +  "Developer & engineering software",
      +  "Business & productivity software",
      +  "Hardware & equipment",
      +  "Advertising & paid media",
      +  "Sales / marketing tools & lead-gen",
      +  "AI creative & content production",
      +  "Office rent & coworking",
      +  "Office supplies & general operations",
      +  "Travel & transport",
      +  "Meals & entertainment",
      +  "Team events & offsites",
      +  "Bank, FX & payment-processing fees",
      +  "Business insurance",
      +  "Corporate income tax",
      +  "Local & business taxes",
      +  "Other operating expense (residual)",
      +  "VAT receivable (input / refund)",
      +  "VAT payable (output)",
      +  "Treasury placement (out)",
      +  "Treasury redemption (in)",
      +  "Investment & interest income",
      +  "Equity proceeds & raise costs",
      +  "Loan drawdowns & repayments",
      +  "Repayable public advances",
      +  "Realised FX gain / loss",
      +  "Inter-account transfer (same entity)",
      +  "Inter-company transfer (own entities)",
      +  "FX conversion principal",
      +  "Uncategorised / suspense",
      +  "Groceries",
      +  "Rent & mortgage",
      +  "Energy, water, internet & phone",
      +  "Health",
      +  "Personal insurance",
      +  "Shopping & clothing",
      +  "Leisure, culture & sport",
      +  "Subscriptions & streaming",
      +  "Childcare & education",
      +  "Gifts & donations",
      +  "Personal taxes",
      +  "Cash withdrawals",
      +  "Salary",
      +  "Other income",
      +  "Other household expenses"
      +]
    • addedOutput schema / properties / allowed_categories
      Added value: +{
      +  "description": "With refusal_reason: the categories this workspace files and is offered. Send `label` back; `name` is how the workspace shows it.",
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "key": {
      +        "type": "string"
      +      },
      +      "label": {
      +        "type": "string"
      +      },
      +      "name": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "key",
      +      "label",
      +      "name"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / refusal_reason
      Added value: +{
      +  "const": "TRANSACTION_CATEGORY_OUTSIDE_WORKSPACE_AUDIENCE",
      +  "description": "Set when the category is not in this workspace's list. Nothing was written.",
      +  "type": "string"
      +}
  4. Changed1 schema field changed
    • addedInput schema / properties / workspace_scope
      Added value: +{
      +  "description": "Restrict this call to the family: the token's primary workspace plus the company workspaces under it that you are a member of. Unrelated authorized workspaces drop out of the read; row reads merge across the family, while a per-workspace figure still reports exactly one workspace.",
      +  "enum": [
      +    "family"
      +  ],
      +  "type": "string"
      +}
  5. Changed1 schema field changed
    • addedOutput schema / properties / newly_connected
      Added value: +{
      +  "description": "Tools that connected to this workspace since the last result and that no session was told about yet, oldest first. Present only when at least one tool is new. Start the reply with one line per entry, in the person's language: \"<name> is connected.\". Never fold several entries into one sentence. Each entry comes back once, on one result only: never repeat its line later.",
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "name": {
      +        "type": "string"
      +      },
      +      "service_id": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "name",
      +      "service_id"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
  6. Added

TDQS

A4.8/5.0
Behavior5/5

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

Goes well past the annotations by disclosing the retroactive rewrite of existing transactions (background, minutes-to-hours), the carve-out that hand-categorized or confirmed rows are never touched, and the instant-trust versus three-correction learning path. It also documents the refusal path with refusal_reason/allowed_categories and the workspace-dependent vocabulary — none of which the annotations convey.

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?

Bold lead-ins and a front-loaded core definition make it scannable despite its length, and nearly every paragraph carries a distinct behavioral fact. The closing paragraph on workspace_id largely restates the schema description, which is the one place it could be trimmed.

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?

For a 6-parameter mutation with an output schema, the description covers all the decision-relevant ground: preconditions, side effects, override precedence, refusal behavior, and multi-workspace disambiguation. An agent could call this correctly and warn the user appropriately without further reading.

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 100%, so the baseline is 3; the description still adds value by naming the source of company_id and by explaining the workspace_id rule (omit when the token authorizes one workspace, required when several) and the closed category vocabulary. It stops short of explaining conversation_id/idempotency_key, which the schema already handles.

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 action (declare a default category), a specific resource (ONE counterparty), and the scope contrast (once per counterparty rather than once per transaction) in the first line. It is immediately distinguishable from the transaction-level sibling, which it names.

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?

Explicit when-to-use routing: 'To change ONE row instead, use well_set_transaction_category'; explicit when-not: multi-nature counterparties such as marketplaces or cloud vendors; explicit exclusion: the workspace's own company. It also names the prerequisite source for company_id (well_list_counterparties).

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