Skip to main content
Glama

marge_client

Calculate a client's pre-tax revenue, expenses, and margin overall and per project, including undocumented expenses, matching VoxFactura's client record.

Instructions

Marge d'un client (client_id = numéro du client dans le compte, le champ id de l'outil clients) : facturé HT, dépenses et marge, en tout et par travail (un devis et ses factures, une facture seule, ou un regroupement), plus une ligne sans_document pour les dépenses du client sans devis ni facture. Mêmes chiffres que la fiche client de VoxFactura ; depenses_en_ttc vrai pour un compte en franchise de TVA. Nécessite une clé avec les permissions factures + dépenses.

Input Schema

NameRequiredDescriptionDefault
dossierNo
client_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.3.0

TDQS

A4/5.0
Behavior4/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 well: it discloses the required permissions (factures + dépenses), the output breakdown including the special `sans_document` line, and a conditional behavior (`depenses_en_ttc` true for VAT-exempt accounts). It does not cover pagination or precise return format, but for a read-only computation that is a minor gap.

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?

The purpose and scope are front-loaded, and the paragraph is dense but each sentence conveys distinct information (breakdown, equivalence, VAT flag, permissions). Slightly heavy, but nothing is clearly wasted.

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 two-parameter computation tool with no annotations and no output schema, the description is complete enough: it explains the input identity, the computed output structure, the special-case line, and the permission prerequisite. Only the `dossier` parameter is left unexplained, which is a small residual gap against an otherwise rich description.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It does explain `client_id` well by tying it to the `id` field of the clients tool, but it says nothing about the `dossier` parameter (default null), leaving one of two parameters entirely undocumented in both schema and description.

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?

The description names a specific computed resource (a client's margin), specifies the exact input identity (`client_id` = the client number, i.e. the `id` field from the clients tool), and enumerates the breakdown structure (total, per job, plus a `sans_document` line). This lets an agent distinguish it from `marge_chantier`, whose scope is sites rather than clients, without opening either schema.

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 useful context ('mêmes chiffres que la fiche client de VoxFactura', needs a key with factures + dépenses permissions), which implies when the tool is appropriate. However, it never explicitly names an alternative or an exclusion (e.g. use `marge_chantier` for per-site margin), so the routing decision must be inferred.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.