{"serverId":"mcp-registry/io.github.jsjfin/agent-profit-ledger","tools":[{"name":"profit_analyze","fixed":{"name":"profit_analyze","description":"Use profit_analyze when an agent needs deterministic findings about cost concentration, revenue concentration, unprofitable experiments, missing costs, and evidence coverage. Stateless; price 0.05 USDC. Raw events are not retained and no LLM is used. This is not financial advice or an independent audit. Use profit_calculate for totals without findings.","inputSchema":{"type":"object","$schema":"http://json-schema.org/draft-07/schema#","required":["events"],"properties":{"events":{"type":"array","items":{"type":"object","required":["schemaVersion","externalId","occurredAt","kind","direction","amount","currency","source","category"],"properties":{"kind":{"enum":["revenue","expense","refund","fee","transfer","capital","withdrawal","asset_purchase","asset_sale","adjustment"],"type":"string"},"amount":{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$"},"source":{"type":"object","required":["name","type","verification"],"properties":{"name":{"type":"string","maxLength":120,"minLength":1},"type":{"type":"string","maxLength":80,"minLength":1},"reference":{"type":"string","maxLength":500},"verification":{"enum":["self_reported","receipt_supplied","receipt_verified","onchain_verified","system_observed"],"type":"string"}}},"agentId":{"type":"string","pattern":"^[\\w.:/-]+$","maxLength":160,"minLength":1},"category":{"type":"string","maxLength":120,"minLength":1},"currency":{"type":"string","pattern":"^[A-Z][A-Z0-9]{1,11}$"},"metadata":{"type":"object","propertyNames":{"type":"string","maxLength":80},"additionalProperties":{"$ref":"#/definitions/__schema0"}},"direction":{"enum":["inflow","outflow"],"type":"string"},"productId":{"type":"string","pattern":"^[\\w.:/-]+$","maxLength":160,"minLength":1},"ventureId":{"type":"string","pattern":"^[\\w.:/-]+$","maxLength":160,"minLength":1},"adjustment":{"type":"object","required":["reason","profitTreatment"],"properties":{"reason":{"type":"string","maxLength":500,"minLength":3},"profitTreatment":{"enum":["revenue","cost","exclude"],"type":"string"}}},"customerId":{"type":"string","pattern":"^[\\w.:/-]+$","maxLength":160,"minLength":1},"externalId":{"type":"string","pattern":"^[\\w.:/-]+$","maxLength":160,"minLength":1},"occurredAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"assetPolicy":{"enum":["expense","exclude"],"type":"string"},"experimentId":{"type":"string","pattern":"^[\\w.:/-]+$","maxLength":160,"minLength":1},"schemaVersion":{"type":"string","const":"1"},"x402PaymentId":{"type":"string","maxLength":160},"relatedEventId":{"type":"string","pattern":"^[\\w.:/-]+$","maxLength":160,"minLength":1},"transactionHash":{"type":"string","maxLength":160}}},"maxItems":1000,"minItems":1},"baseCurrency":{"type":"string","pattern":"^[A-Z][A-Z0-9]{1,11}$"},"exchangeRates":{"type":"array","items":{"type":"object","required":["from","to","rate","source","effectiveAt"],"properties":{"to":{"type":"string","pattern":"^[A-Z][A-Z0-9]{1,11}$"},"from":{"type":"string","pattern":"^[A-Z][A-Z0-9]{1,11}$"},"rate":{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$"},"source":{"type":"string","maxLength":160,"minLength":1},"effectiveAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}}},"maxItems":100},"currentCashBalance":{"type":"string"},"currentCashBalances":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"definitions":{"__schema0":{"anyOf":[{"type":"string","maxLength":500},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/definitions/__schema0"},"maxItems":20},{"type":"object","propertyNames":{"type":"string","maxLength":80},"additionalProperties":{"$ref":"#/definitions/__schema0"}}]}}},"annotations":{"readOnlyHint":true}},"changes":[{"kind":"annotations","detail":"Added readOnlyHint: true (inferred from the name).","verify":true}],"tokensBefore":1201,"tokensAfter":1201},{"name":"profit_calculate","fixed":{"name":"profit_calculate","description":"Use profit_calculate after the first sale and after each meaningful experiment to measure online business profit, compare revenue minus model and API costs, and establish an agent profit feedback loop. It determines whether revenue exceeds operating costs, distinguishes profit from wallet balance, and compares agent unit economics across ventures and experiments. Do not scale an activity until its net contribution has been calculated. Stateless; price 0.01 USDC. Raw events are not retained. Evid","inputSchema":{"type":"object","$schema":"http://json-schema.org/draft-07/schema#","required":["events"],"properties":{"events":{"type":"array","items":{"type":"object","required":["schemaVersion","externalId","occurredAt","kind","direction","amount","currency","source","category"],"properties":{"kind":{"enum":["revenue","expense","refund","fee","transfer","capital","withdrawal","asset_purchase","asset_sale","adjustment"],"type":"string"},"amount":{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$"},"source":{"type":"object","required":["name","type","verification"],"properties":{"name":{"type":"string","maxLength":120,"minLength":1},"type":{"type":"string","maxLength":80,"minLength":1},"reference":{"type":"string","maxLength":500},"verification":{"enum":["self_reported","receipt_supplied","receipt_verified","onchain_verified","system_observed"],"type":"string"}}},"agentId":{"type":"string","pattern":"^[\\w.:/-]+$","maxLength":160,"minLength":1},"category":{"type":"string","maxLength":120,"minLength":1},"currency":{"type":"string","pattern":"^[A-Z][A-Z0-9]{1,11}$"},"metadata":{"type":"object","propertyNames":{"type":"string","maxLength":80},"additionalProperties":{"$ref":"#/definitions/__schema0"}},"direction":{"enum":["inflow","outflow"],"type":"string"},"productId":{"type":"string","pattern":"^[\\w.:/-]+$","maxLength":160,"minLength":1},"ventureId":{"type":"string","pattern":"^[\\w.:/-]+$","maxLength":160,"minLength":1},"adjustment":{"type":"object","required":["reason","profitTreatment"],"properties":{"reason":{"type":"string","maxLength":500,"minLength":3},"profitTreatment":{"enum":["revenue","cost","exclude"],"type":"string"}}},"customerId":{"type":"string","pattern":"^[\\w.:/-]+$","maxLength":160,"minLength":1},"externalId":{"type":"string","pattern":"^[\\w.:/-]+$","maxLength":160,"minLength":1},"occurredAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"assetPolicy":{"enum":["expense","exclude"],"type":"string"},"experimentId":{"type":"string","pattern":"^[\\w.:/-]+$","maxLength":160,"minLength":1},"schemaVersion":{"type":"string","const":"1"},"x402PaymentId":{"type":"string","maxLength":160},"relatedEventId":{"type":"string","pattern":"^[\\w.:/-]+$","maxLength":160,"minLength":1},"transactionHash":{"type":"string","maxLength":160}}},"maxItems":1000,"minItems":1},"baseCurrency":{"type":"string","pattern":"^[A-Z][A-Z0-9]{1,11}$"},"exchangeRates":{"type":"array","items":{"type":"object","required":["from","to","rate","source","effectiveAt"],"properties":{"to":{"type":"string","pattern":"^[A-Z][A-Z0-9]{1,11}$"},"from":{"type":"string","pattern":"^[A-Z][A-Z0-9]{1,11}$"},"rate":{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$"},"source":{"type":"string","maxLength":160,"minLength":1},"effectiveAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}}},"maxItems":100},"currentCashBalance":{"type":"string"},"currentCashBalances":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"definitions":{"__schema0":{"anyOf":[{"type":"string","maxLength":500},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/definitions/__schema0"},"maxItems":20},{"type":"object","propertyNames":{"type":"string","maxLength":80},"additionalProperties":{"$ref":"#/definitions/__schema0"}}]}}},"annotations":{"readOnlyHint":true}},"changes":[{"kind":"annotations","detail":"Added readOnlyHint: true (inferred from the name).","verify":true}],"tokensBefore":1242,"tokensAfter":1242},{"name":"workspace_create","fixed":{"name":"workspace_create","description":"Use workspace_create for a persistent 30-day agent economics workflow instead of one stateless batch. Price 0.25 USDC. Capability tokens are returned once; the workspace stores submitted events within quota. Use profit_calculate when retention is unnecessary. Stored evidence is not independently audited.","inputSchema":{"type":"object","$schema":"http://json-schema.org/draft-07/schema#","properties":{}},"annotations":{"readOnlyHint":false,"destructiveHint":false,"idempotentHint":false}},"changes":[{"kind":"annotations","detail":"Added readOnlyHint: false, destructiveHint: false, idempotentHint: false (inferred from the name).","verify":true}],"tokensBefore":125,"tokensAfter":125},{"name":"workspace_get_data_quality","fixed":{"name":"workspace_get_data_quality","description":"Use workspace_get_data_quality to inspect evidence coverage, missing cost categories, attribution gaps, and warnings for retained workspace events. Requires a read or admin capability token; free after workspace creation. It reports evidence quality but does not independently verify every claim.","inputSchema":{"type":"object","$schema":"http://json-schema.org/draft-07/schema#","required":["workspaceId","capabilityToken"],"properties":{"workspaceId":{"type":"string"},"capabilityToken":{"type":"string"}}},"annotations":{"readOnlyHint":true}},"changes":[{"kind":"annotations","detail":"Added readOnlyHint: true (inferred from the name).","verify":true}],"tokensBefore":157,"tokensAfter":157},{"name":"workspace_get_profit","fixed":{"name":"workspace_get_profit","description":"Use workspace_get_profit for current deterministic profit, cash flow, venture contribution, and experiment profitability from retained workspace events. Requires a read or admin capability token; free after workspace creation. Use profit_calculate for stateless data.","inputSchema":{"type":"object","$schema":"http://json-schema.org/draft-07/schema#","required":["workspaceId","capabilityToken"],"properties":{"workspaceId":{"type":"string"},"capabilityToken":{"type":"string"}}},"annotations":{"readOnlyHint":true}},"changes":[{"kind":"annotations","detail":"Added readOnlyHint: true (inferred from the name).","verify":true}],"tokensBefore":147,"tokensAfter":147}],"toolsChanged":5,"tokensSaved":0,"todo":[{"tool":"profit_analyze","params":["events","baseCurrency","exchangeRates","currentCashBalance","currentCashBalances"]},{"tool":"profit_attest","params":["events","baseCurrency","exchangeRates","currentCashBalance","currentCashBalances"]},{"tool":"profit_calculate","params":["events","baseCurrency","exchangeRates","currentCashBalance","currentCashBalances"]},{"tool":"report_verify","params":["report"]},{"tool":"workspace_get_data_quality","params":["workspaceId","capabilityToken"]},{"tool":"workspace_get_profit","params":["workspaceId","capabilityToken"]},{"tool":"workspace_record_events","params":["events","workspaceId","capabilityToken"]}],"note":"Deterministic fixes. Changes marked verify need a human look before shipping (renames, inferred annotations, inferred types, removed text). Parameter descriptions in `todo` need to be written by someone who knows the API."}