Skip to main content
Glama

Record advertising spend

dosai_add_ad_spend

Record how much was spent on an ad or campaign over a period, so analytics can show the cost of a lead. dimension says what value names: campaign or utm_campaign = campaign name, ad_source_id = an ad id, utm_source = a source like instagram, ep_app = the ad app. Owner only.

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": {
      "project_id": "<project_id>",
      "dimension": "<dimension>",
      "value": "<value>",
      "period_from": "<period_from>",
      "period_to": "<period_to>",
      "amount": "<amount>"
    },
    "name": "dosai_add_ad_spend"
  }
}

Input Schema

NameRequiredDescriptionDefault
labelNo
valueYes
amountYes
currencyNoDefault kzt.
dimensionYes
period_toYes
project_idYesFrom dosai_list_projects.
period_fromYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
    • changedInput schema / properties / project_id / description
      Previous value: -"Project id, as returned by dosai_list_projects."New value: +"From dosai_list_projects."
  2. Changed1 schema field changed
    • removedInput schema / properties / project_id / pattern
      Removed value: -"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  3. Added

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare a non-read-only, non-destructive, closed-world write, so the safety profile is covered. The description adds the genuinely useful 'Owner only' authorization constraint, but says nothing about duplicate/overwrite behaviour for the same campaign and period, nor about any response or side effects.

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?

Two sentences, purpose front-loaded, then the dimension decoding and the owner restriction. The phrasing of the dimension clause ('dimension says what value names') is awkward and slightly harder to parse than it needs to be, but nothing is padding.

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

Completeness3/5

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

For an 8-parameter, 6-required write tool with 25% schema coverage and no output schema, the description covers purpose, the key enum, and permissions. It is still thin on duplicate handling, currency/amount expectations, and the role of `label`, which an agent must guess.

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 only 25%, so the description must carry weight, and it does for the hardest parameter: it decodes all five `dimension` enum values (campaign/utm_campaign = name, ad_source_id = ad id, utm_source = a source like instagram, ep_app = ad app). It leaves `value`, `label`, and the period fields' expected semantics unstated beyond what the schema and name suggest.

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 uses a specific verb and resource ('Record how much was spent on an ad or campaign over a period') and states the downstream purpose (cost of a lead in analytics). The write-vs-read distinction from the sibling dosai_list_ad_spend is implied by 'Record' but never made explicit.

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

Usage Guidelines3/5

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

It gives a real precondition ('Owner only') and a motive for calling it (analytics cost-of-lead reporting), which is more than most mutation tools offer. It does not say when not to use it, how it relates to dosai_list_ad_spend or dosai_get_ad_goals, or what happens if spend already exists for the same period.

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