margin_doctor
Marge par deal — Gapup agent-payable C-suite expertise (CRO). Returns a structured, audited deliverable. Reference case: Gapup Hub — 8 deals pipeline · €28k ARR sous-marge détecté · Récupération €4.2k/an · Playbook 4 scénarios. Inputs are validated server-side — send the documented case fields.
This record as markdown: /tools/io-github-getgapup-gapup-mcp/margin-doctor.md
What margin_doctor does on Gapup Mcp
AI agents use margin_doctor to commit financial operations through Gapup Mcp, usually the final step of a payment, billing, or trading workflow. A call moves real money.
| Parameter | Type | Required | Description |
|---|---|---|---|
async | boolean | — | If true, returns a job_id immediately (<200ms) instead of waiting for the result. Poll the result with job_result(job_id). Use for slow tools to avoid client ti |
deals | array | Yes | |
company | object | Yes | |
product | object | Yes |
Parameters from the server's own tool schema.
Why margin_doctor is rated Critical
This tool performs per-call financial analysis of deal margins with direct monetary implications (margin recovery of €4.2k/year cited as reference outcome). It is agent-payable (x402 protocol), meaning each invocation commits a financial transaction.
From the tool's definition Marge par deal — CRO expertise, €28k ARR sous-marge détecté · Récupération €4.2k/an — agent-payable (x402 per-call), financial margin analysis and recovery playbook
Risk signalsHigh parameter count (16 properties)
Attacks that exploit this kind of access
The rule that runs margin_doctor safely
PolicyLayer is an MCP gateway: it sits between your AI agents and Gapup Mcp, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For margin_doctor, this is the rule to start with:
Any call to margin_doctor is blocked until a human approves it. The rest of the server keeps working.
The button opens the PolicyLayer dashboard: create your workspace, connect Gapup Mcp, apply this rule, and every margin_doctor call is checked against it from then on.
Questions about margin_doctor
Marge par deal — Gapup agent-payable C-suite expertise (CRO). Returns a structured, audited deliverable. Reference case: Gapup Hub — 8 deals pipeline · €28k ARR sous-marge détecté · Récupération €4.2k/an · Playbook 4 scénarios. Inputs are validated server-side — send the documented case fields. It is categorised as a Financial tool in the Gapup Mcp MCP Server, which means it involves financial transactions. Block by default and require explicit approval.
margin_doctor accepts 4 parameters: async, deals, company, product. Required: deals, company, product. The full parameter table on this page comes from the server's own tool schema.
Register the Gapup MCP server in PolicyLayer and add a rule for margin_doctor: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Gapup Mcp. Nothing to install.
margin_doctor is a Financial tool with critical risk. Critical-risk tools should be blocked by default and only enabled with explicit human approval.
Yes. Add a rate_limit block to the margin_doctor rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for margin_doctor. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
margin_doctor is provided by the Gapup MCP server (https://mcp.gapup.io/mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on Gapup, and thousands of servers like it.
Across the catalogue