Skip to main content
Glama

Update company

update_company
Destructive

Update fields on a company by id. Provide a patch with at least one field. representationState is explicit and never inferred from contacts. primaryContactId can select an existing contact already linked to this same non-individual company; send null to clear it. Use search_companies first to find the company id. The result echoes the operating workspace.

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": {
      "id": "<id>",
      "patch": "<patch>"
    },
    "name": "update_company"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesThe company id returned by search_companies.
patchYesThe company fields to update; include at least one changed field.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed18 schema fields changed
    • addedInput schema / properties / patch / properties / bankName
      Added value: +{
      +  "anyOf": [
      +    {
      +      "maxLength": 160,
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "The counterparty's bank name. Optional."
      +}
    • addedInput schema / properties / patch / properties / counterpartyType
      Added value: +{
      +  "description": "Counterparty type: company, sole_trader, or individual. Defaults to company.",
      +  "enum": [
      +    "company",
      +    "sole_trader",
      +    "individual"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / patch / properties / creditLimit
      Added value: +{
      +  "anyOf": [
      +    {
      +      "description": "Non-negative credit limit up to 999999999999.99.",
      +      "pattern": "^(?:0|[1-9]\\d{0,11})(?:\\.\\d{1,2})?$",
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Maximum outstanding balance. Optional; requires creditLimitCurrency."
      +}
    • addedInput schema / properties / patch / properties / creditLimitCurrency
      Added value: +{
      +  "anyOf": [
      +    {
      +      "description": "Uppercase 3-letter ISO currency for the credit limit.",
      +      "maxLength": 3,
      +      "pattern": "^[A-Z]{3}$",
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "ISO currency for creditLimit. Required when creditLimit is set."
      +}
    • addedInput schema / properties / patch / properties / deliveryAddress
      Added value: +{
      +  "anyOf": [
      +    {
      +      "maxLength": 500,
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Delivery address. Optional."
      +}
    • addedInput schema / properties / patch / properties / edrpou
      Added value: +{
      +  "anyOf": [
      +    {
      +      "description": "Tax id: 8-digit ЄДРПОУ or 10-digit ІПН.",
      +      "maxLength": 20,
      +      "pattern": "^\\d{8}(\\d{2})?$",
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Tax identifier: 8-digit EDRPOU or 10-digit taxpayer number. Optional."
      +}
    • addedInput schema / properties / patch / properties / email
      Added value: +{
      +  "anyOf": [
      +    {
      +      "description": "The company email.",
      +      "format": "email",
      +      "maxLength": 255,
      +      "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "The company email. Optional."
      +}
    • addedInput schema / properties / patch / properties / iban
      Added value: +{
      +  "anyOf": [
      +    {
      +      "maxLength": 34,
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "The counterparty's IBAN. Optional."
      +}
    • addedInput schema / properties / patch / properties / legalAddress
      Added value: +{
      +  "anyOf": [
      +    {
      +      "maxLength": 500,
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Legal address. Optional."
      +}
    • addedInput schema / properties / patch / properties / paymentTermsDays
      Added value: +{
      +  "anyOf": [
      +    {
      +      "description": "Payment terms in whole days from 0 to 365.",
      +      "maximum": 365,
      +      "minimum": 0,
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Agreed payment term in days (0-365). Optional."
      +}
    • addedInput schema / properties / patch / properties / phone
      Added value: +{
      +  "anyOf": [
      +    {
      +      "description": "The company phone.",
      +      "maxLength": 50,
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "The company phone. Optional."
      +}
    • addedInput schema / properties / patch / properties / primaryContactId
      Added value: +{
      +  "anyOf": [
      +    {
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "CRM contact id to designate as this counterparty's primary contact. Must already belong to this company; null clears it."
      +}
    • addedInput schema / properties / patch / properties / representationState
      Added value: +{
      +  "description": "Declared representation state: unspecified, works_alone, or has_representatives. Never inferred from contact count.",
      +  "enum": [
      +    "unspecified",
      +    "works_alone",
      +    "has_representatives"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / patch / properties / tags
      Added value: +{
      +  "description": "Tags for segmentation. Optional.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedInput schema / properties / patch / properties / taxGroup
      Added value: +{
      +  "anyOf": [
      +    {
      +      "enum": [
      +        "group_1",
      +        "group_2",
      +        "group_3"
      +      ],
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Single-tax group. Only meaningful for a sole trader on the simplified system."
      +}
    • addedInput schema / properties / patch / properties / taxSystem
      Added value: +{
      +  "anyOf": [
      +    {
      +      "enum": [
      +        "simplified",
      +        "general"
      +      ],
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Tax system: simplified or general. Optional."
      +}
    • addedInput schema / properties / patch / properties / vatNumber
      Added value: +{
      +  "anyOf": [
      +    {
      +      "maxLength": 20,
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "VAT payer identifier. Optional."
      +}
    • addedInput schema / properties / patch / properties / vatPayer
      Added value: +{
      +  "description": "Whether the counterparty is a VAT payer. Optional.",
      +  "type": "boolean"
      +}
  2. Changed1 schema field changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  3. Changed6 schema fields changed
    • changedInput schema / properties / id / description
      Previous value: -"The company id returned by the matching search/list tool."New value: +"The company id returned by search_companies."
    • addedInput schema / properties / patch / properties / industry / description
      Added value: +"The company's industry. Optional."
    • addedInput schema / properties / patch / properties / ownerId / description
      Added value: +"User id of the workspace member who owns this company. Optional."
    • changedInput schema / properties / patch / properties / size / description
      Previous value: -"Company size band. One of: solo, small, medium, large, enterprise."New value: +"Company size band. Optional. One of: solo, small, medium, large, enterprise."
    • changedInput schema / properties / patch / properties / status / description
      Previous value: -"Relationship status. One of: prospect, active, inactive."New value: +"Relationship status. Optional. One of: prospect, active, inactive."
    • addedInput schema / properties / patch / properties / website / description
      Added value: +"The company website URL. Optional."
  4. Changed6 schema fields changed
    • changedInput schema / properties / patch / properties / industry / anyOf
      Previous value: -[
      -  {
      -    "maxLength": 120,
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "description": "The company's industry.",
      +    "maxLength": 120,
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / patch / properties / name / description
      Added value: +"The company name (unique within the workspace)."
    • changedInput schema / properties / patch / properties / ownerId / anyOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "description": "User id of the workspace member who owns this company.",
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / patch / properties / size / description
      Added value: +"Company size band. One of: solo, small, medium, large, enterprise."
    • addedInput schema / properties / patch / properties / status / description
      Added value: +"Relationship status. One of: prospect, active, inactive."
    • changedInput schema / properties / patch / properties / website / anyOf
      Previous value: -[
      -  {
      -    "format": "uri",
      -    "maxLength": 255,
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "description": "The company website URL.",
      +    "format": "uri",
      +    "maxLength": 255,
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
  5. Changed2 schema fields changed
    • addedInput schema / properties / id / description
      Added value: +"The company id returned by the matching search/list tool."
    • addedInput schema / properties / patch / description
      Added value: +"The company fields to update; include at least one changed field."
  6. Added

TDQS

A4/5.0
Behavior4/5

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

Annotations already flag destructiveHint=true and non-idempotent, so the mutation profile is covered. The description adds genuinely non-obvious behavior: representationState is explicit and never inferred, primaryContactId must be an already-linked contact of a non-individual company (null clears it), and the result echoes the operating workspace.

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?

Front-loaded with the core action, then constraint details in order of importance. Every sentence carries a constraint or a routing hint, though the density is high and could be trimmed marginally.

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 mutation tool with rich 100%-covered schema and full annotations, and no output schema, the description covers the key invariants (patch non-empty, representationState explicitness, primaryContactId clearing, result contents). No critical gap remains.

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 description coverage is 100%, so the baseline is 3. The description adds semantics the schema does not convey: the 'at least one field' patch invariant, the explicit/never-inferred nature of representationState, and the 'non-individual company' scoping on primaryContactId.

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?

States a specific verb and resource ('Update fields on a company by id') that clearly distinguishes it from create_company, get_company, and search_companies. It does not explicitly contrast with sibling update_* tools, but the resource is unambiguous.

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?

Provides an explicit prerequisite workflow ('Use search_companies first to find the company id') and a payload rule ('Provide a patch with at least one field'). It stops short of stating when not to use it or naming an alternative update path, but the calling context is clear.

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