Skip to main content
Glama

Create Cost Center

create_cost_center

Create a cost center (POST /api/cost-centers) — a bucket that allocation rules route spend into (a team, product or business unit). Pass name, and optionally description, color (hex) and parent_cost_center_id to nest it (max 5 levels; the parent must not own rules itself — only leaf centers hold rules). A new center holds $0 until a rule targets it, so this is normally followed by preview_allocation_rule + create_allocation_rule. Additive and reversible (delete it in the dashboard). Requires a paid plan. WRITE TOOL — MCP WRITES ARE OFF BY DEFAULT FOR EVERY ORGANIZATION. This call needs ALL FOUR of: the admin:write scope, the organization switch turned on (an org admin enables it in Settings → Organization → AI agent access), an admin or super_admin org role, and confirm:true. Missing any one of them it refuses and changes nothing, and the error names which one — relay that to the user rather than retrying. Read-only cak_ API keys can never perform it. Example: { "name": "Platform team", "color": "#2563eb", "confirm": true }.

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

Input Schema

NameRequiredDescriptionDefault
nameYesDisplay name, e.g. "Platform team". Required.
colorNoOptional hex color for charts, e.g. "#16a34a".
confirmNoSet to true to actually make the change. Required: the tool refuses the mutation unless confirm:true is present. Authorization for the change itself is your org role, checked server-side.
descriptionNoOptional free-text description.
parent_cost_center_idNoNest the new center under this one (list_cost_centers). Omit for a top-level center. The parent must not own rules itself (only leaf centers hold rules), and the hierarchy is capped at 5 levels.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Goes far beyond the annotations by detailing the four-gate authorization model (scope, org switch, role, confirm:true), the fact MCP writes are off by default, that read-only keys can never perform it, and that errors name the missing gate and should not be retried. It also discloses reversibility ("Additive and reversible — delete it in the dashboard") and the paid-plan requirement, which the annotations cannot 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?

Front-loaded with purpose and endpoint, then preconditions, then the auth gauntlet, then an example — a sensible order. The ALL-CAPS warning plus the repeated enumeration of the four gates is somewhat heavy, but the stakes for a write tool justify most of the density.

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?

No output schema exists, yet nothing an agent needs to call this correctly is missing: required vs optional params, nesting constraints, plan gating, the full auth checklist, expected error handling, follow-up tools, and reversibility are all covered.

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, but the description adds real semantic value: it explains the nesting model for parent_cost_center_id (leaf-only rule ownership, 5-level cap), the role of confirm in the gating chain, and provides a worked payload example. The color/description params are only lightly characterized beyond the schema.

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 and resource ("Create a cost center (POST /api/cost-centers)") and immediately disambiguates the concept — "a bucket that allocation rules route spend into (a team, product or business unit)". This distinguishes it cleanly from rule-creation and read siblings like list_cost_centers.

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 clear workflow context — "A new center holds $0 until a rule targets it, so this is normally followed by preview_allocation_rule + create_allocation_rule" — plus structural preconditions (parent must not own rules, max 5 levels) and plan requirements. It stops short of an explicit "use X instead when..." exclusion, so it lands just below the top band.

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