Skip to main content
Glama

Field Service Business Platform by Doing Work

costs_setMarginAlert

Set a profit alert (owner only): when an invoiced job's margin drops under below_percent, the job.margin_low event fires once for it (subscribe with a webhook). It fires again only after the margin climbs back and drops again. The check reads job costing as you see it. null turns it off.

Input Schema

NameRequiredDescriptionDefault
shop_idYes
below_percentYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so well: it discloses the emitted event name (job.margin_low), that it fires only once per downward crossing, that it re-arms only after margin recovers and drops again, the permission requirement, and the null-disables behavior. These are non-obvious semantics an agent could not infer from the schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three tight sentences, front-loaded with the action and permission scope, then the event contract, then the disable path. Every clause adds information that is not available elsewhere.

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?

Output schema exists, so return values need no explanation, and the description covers permissions, event behavior, re-arm logic, and disabling. Remaining gap is scope: it doesn't say whether the alert is per-shop globally or evaluated per job, which matters given a required shop_id.

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 0%, so the description must compensate. It explains below_percent fully — threshold semantics plus null to turn the alert off — but never mentions shop_id, leaving it to the self-evident name and uuid format. The 0–100 bounds in the schema are undocumented in prose.

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?

Opens with a specific verb+resource: 'Set a profit alert'. It goes further than the name by defining the alert as a margin-threshold trigger on invoiced jobs, so an agent knows exactly what this configures and how it differs from the read-side sibling costs_marginAlert.

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?

States the precondition '(owner only)', the follow-up action needed to consume the alert ('subscribe with a webhook'), and how to disable it ('null turns it off'). There is no explicit contrast with the costs_marginAlert sibling, but the use conditions are clear enough to act on.

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