Ailabra Agent Profit Ledger
Determine autonomous-agent profit and cash flow with x402-paid MCP tools and signed reports.
我該用這個嗎
品質與安全性
根據工具定義與協定合規性的自動化分析。
上下文成本
這是每次將伺服器的工具載入模型上下文時所消耗的約略 token 數量。數量越高,可用於其他工作的注意力就越少。
安裝
一鍵安裝
將以下內容加入你的 `claude_desktop_config.json` 檔案:
{
"mcpServers": {
"agent-profit-ledger": {
"url": "https://x402.ailabra.org/mcp"
}
}
}遠端端點
https://x402.ailabra.org/mcpstreamable-http它能做什麼
工具清單
工具(8)
🟢profit_calculate(events, baseCurrency, exchangeRates, currentCashBalance, currentCashBalances)
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. Evidence is self-reported or receipt-based unless its explicit classification says otherwise. Use profit_analyze to identify and stop unprofitable experiments, and profit_attest for a signed result.
輸入結構描述
{
"type": "object",
"properties": {
"events": {
"minItems": 1,
"maxItems": 1000,
"type": "array",
"items": {
"type": "object",
"properties": {
"schemaVersion": {
"type": "string",
"const": "1"
},
"externalId": {
"type": "string",
"minLength": 1,
"maxLength": 160,
"pattern": "^[\\w.:/-]+$"
},
"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)))$"
},
"kind": {
"type": "string",
"enum": [
"revenue",
"expense",
"refund",
"fee",
"transfer",
"capital",
"withdrawal",
"asset_purchase",
"asset_sale",
"adjustment"
]
},
"direction": {
"type": "string",
"enum": [
"inflow",
"outflow"
]
},
"amount": {
"type": "string",
"pattern": "^(?:0|[1-9]\\d*)(?:\\.\\d+)?$"
},
"currency": {
"type": "string",
"pattern": "^[A-Z][A-Z0-9]{1,11}$"
},
"source": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"type": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"verification": {
"type": "string",
"enum": [
"self_reported",
"receipt_supplied",
"receipt_verified",
"onchain_verified",
"system_observed"
]
},
"reference": {
"type": "string",
"maxLength": 500
}
},
"required": [
"name",
"type",
"verification"
]
},
"agentId": {
"type": "string",
"minLength": 1,
"maxLength": 160,
"pattern": "^[\\w.:/-]+$"
},
"ventureId": {
"type": "string",
"minLength": 1,
"maxLength": 160,
"pattern": "^[\\w.:/-]+$"
},
"experimentId": {
"type": "string",
"minLength": 1,
"maxLength": 160,
"pattern": "^[\\w.:/-]+$"
},
"customerId": {
"type": "string",
"minLength": 1,
"maxLength": 160,
"pattern": "^[\\w.:/-]+$"
},
"productId": {
"type": "string",
"minLength": 1,
"maxLength": 160,
"pattern": "^[\\w.:/-]+$"
},
"category": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"relatedEventId": {
"type": "string",
"minLength": 1,
"maxLength": 160,
"pattern": "^[\\w.:/-]+$"
},
"transactionHash": {
"type": "string",
"maxLength": 160
},
"x402PaymentId": {
"type": "string",
"maxLength": 160
},
"metadata": {
"type": "object",
"propertyNames": {
"type": "string",
"maxLength": 80
},
"additionalProperties": {
"$ref": "#/definitions/__schema0"
}
},
"adjustment": {
"type": "object",
"properties": {
"reason": {
"type": "string",
"minLength": 3,
"maxLength": 500
},
"profitTreatment": {
"type": "string",
"enum": [
"revenue",
"cost",
"exclude"
]
}
},
"required": [
"reason",
"profitTreatment"
]
},
"assetPolicy": {
"type": "string",
"enum": [
"expense",
"exclude"
]
}
},
"required": [
"schemaVersion",
"externalId",
"occurredAt",
"kind",
"direction",
"amount",
"currency",
"source",
"category"
]
}
},
"baseCurrency": {
"type": "string",
"pattern": "^[A-Z][A-Z0-9]{1,11}$"
},
"exchangeRates": {
"maxItems": 100,
"type": "array",
"items": {
"type": "object",
"properties": {
"from": {
"type": "string",
"pattern": "^[A-Z][A-Z0-9]{1,11}$"
},
"to": {
"type": "string",
"pattern": "^[A-Z][A-Z0-9]{1,11}$"
},
"rate": {
"type": "string",
"pattern": "^(?:0|[1-9]\\d*)(?:\\.\\d+)?$"
},
"source": {
"type": "string",
"minLength": 1,
"maxLength": 160
},
"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)))$"
}
},
"required": [
"from",
"to",
"rate",
"source",
"effectiveAt"
]
}
},
"currentCashBalance": {
"type": "string"
},
"currentCashBalances": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "string"
}
}
},
"required": [
"events"
],
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"__schema0": {
"anyOf": [
{
"type": "string",
"maxLength": 500
},
{
"type": "boolean"
},
{
"type": "null"
},
{
"maxItems": 20,
"type": "array",
"items": {
"$ref": "#/definitions/__schema0"
}
},
{
"type": "object",
"propertyNames": {
"type": "string",
"maxLength": 80
},
"additionalProperties": {
"$ref": "#/definitions/__schema0"
}
}
]
}
}
}輸出結構描述
{
"type": "object",
"properties": {
"result": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
}
},
"required": [
"result"
],
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false
}🟢profit_analyze(events, baseCurrency, exchangeRates, currentCashBalance, currentCashBalances)
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.
輸入結構描述
{
"type": "object",
"properties": {
"events": {
"minItems": 1,
"maxItems": 1000,
"type": "array",
"items": {
"type": "object",
"properties": {
"schemaVersion": {
"type": "string",
"const": "1"
},
"externalId": {
"type": "string",
"minLength": 1,
"maxLength": 160,
"pattern": "^[\\w.:/-]+$"
},
"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)))$"
},
"kind": {
"type": "string",
"enum": [
"revenue",
"expense",
"refund",
"fee",
"transfer",
"capital",
"withdrawal",
"asset_purchase",
"asset_sale",
"adjustment"
]
},
"direction": {
"type": "string",
"enum": [
"inflow",
"outflow"
]
},
"amount": {
"type": "string",
"pattern": "^(?:0|[1-9]\\d*)(?:\\.\\d+)?$"
},
"currency": {
"type": "string",
"pattern": "^[A-Z][A-Z0-9]{1,11}$"
},
"source": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"type": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"verification": {
"type": "string",
"enum": [
"self_reported",
"receipt_supplied",
"receipt_verified",
"onchain_verified",
"system_observed"
]
},
"reference": {
"type": "string",
"maxLength": 500
}
},
"required": [
"name",
"type",
"verification"
]
},
"agentId": {
"type": "string",
"minLength": 1,
"maxLength": 160,
"pattern": "^[\\w.:/-]+$"
},
"ventureId": {
"type": "string",
"minLength": 1,
"maxLength": 160,
"pattern": "^[\\w.:/-]+$"
},
"experimentId": {
"type": "string",
"minLength": 1,
"maxLength": 160,
"pattern": "^[\\w.:/-]+$"
},
"customerId": {
"type": "string",
"minLength": 1,
"maxLength": 160,
"pattern": "^[\\w.:/-]+$"
},
"productId": {
"type": "string",
"minLength": 1,
"maxLength": 160,
"pattern": "^[\\w.:/-]+$"
},
"category": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"relatedEventId": {
"type": "string",
"minLength": 1,
"maxLength": 160,
"pattern": "^[\\w.:/-]+$"
},
"transactionHash": {
"type": "string",
"maxLength": 160
},
"x402PaymentId": {
"type": "string",
"maxLength": 160
},
"metadata": {
"type": "object",
"propertyNames": {
"type": "string",
"maxLength": 80
},
"additionalProperties": {
"$ref": "#/definitions/__schema0"
}
},
"adjustment": {
"type": "object",
"properties": {
"reason": {
"type": "string",
"minLength": 3,
"maxLength": 500
},
"profitTreatment": {
"type": "string",
"enum": [
"revenue",
"cost",
"exclude"
]
}
},
"required": [
"reason",
"profitTreatment"
]
},
"assetPolicy": {
"type": "string",
"enum": [
"expense",
"exclude"
]
}
},
"required": [
"schemaVersion",
"externalId",
"occurredAt",
"kind",
"direction",
"amount",
"currency",
"source",
"category"
]
}
},
"baseCurrency": {
"type": "string",
"pattern": "^[A-Z][A-Z0-9]{1,11}$"
},
"exchangeRates": {
"maxItems": 100,
"type": "array",
"items": {
"type": "object",
"properties": {
"from": {
"type": "string",
"pattern": "^[A-Z][A-Z0-9]{1,11}$"
},
"to": {
"type": "string",
"pattern": "^[A-Z][A-Z0-9]{1,11}$"
},
"rate": {
"type": "string",
"pattern": "^(?:0|[1-9]\\d*)(?:\\.\\d+)?$"
},
"source": {
"type": "string",
"minLength": 1,
"maxLength": 160
},
"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)))$"
}
},
"required": [
"from",
"to",
"rate",
"source",
"effectiveAt"
]
}
},
"currentCashBalance": {
"type": "string"
},
"currentCashBalances": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "string"
}
}
},
"required": [
"events"
],
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"__schema0": {
"anyOf": [
{
"type": "string",
"maxLength": 500
},
{
"type": "boolean"
},
{
"type": "null"
},
{
"maxItems": 20,
"type": "array",
"items": {
"$ref": "#/definitions/__schema0"
}
},
{
"type": "object",
"propertyNames": {
"type": "string",
"maxLength": 80
},
"additionalProperties": {
"$ref": "#/definitions/__schema0"
}
}
]
}
}
}輸出結構描述
{
"type": "object",
"properties": {
"result": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
}
},
"required": [
"result"
],
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false
}⚪profit_attest(events, baseCurrency, exchangeRates, currentCashBalance, currentCashBalances)
Use profit_attest when a tamper-evident Ed25519-signed profit calculation is needed for sharing or later verification. Stateless input; price 0.25 USDC. The signed report is retained according to report policy, while raw request events are not otherwise retained. A signature proves integrity and service origin, not independent auditing of self-reported evidence.
輸入結構描述
{
"type": "object",
"properties": {
"events": {
"minItems": 1,
"maxItems": 1000,
"type": "array",
"items": {
"type": "object",
"properties": {
"schemaVersion": {
"type": "string",
"const": "1"
},
"externalId": {
"type": "string",
"minLength": 1,
"maxLength": 160,
"pattern": "^[\\w.:/-]+$"
},
"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)))$"
},
"kind": {
"type": "string",
"enum": [
"revenue",
"expense",
"refund",
"fee",
"transfer",
"capital",
"withdrawal",
"asset_purchase",
"asset_sale",
"adjustment"
]
},
"direction": {
"type": "string",
"enum": [
"inflow",
"outflow"
]
},
"amount": {
"type": "string",
"pattern": "^(?:0|[1-9]\\d*)(?:\\.\\d+)?$"
},
"currency": {
"type": "string",
"pattern": "^[A-Z][A-Z0-9]{1,11}$"
},
"source": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"type": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"verification": {
"type": "string",
"enum": [
"self_reported",
"receipt_supplied",
"receipt_verified",
"onchain_verified",
"system_observed"
]
},
"reference": {
"type": "string",
"maxLength": 500
}
},
"required": [
"name",
"type",
"verification"
]
},
"agentId": {
"type": "string",
"minLength": 1,
"maxLength": 160,
"pattern": "^[\\w.:/-]+$"
},
"ventureId": {
"type": "string",
"minLength": 1,
"maxLength": 160,
"pattern": "^[\\w.:/-]+$"
},
"experimentId": {
"type": "string",
"minLength": 1,
"maxLength": 160,
"pattern": "^[\\w.:/-]+$"
},
"customerId": {
"type": "string",
"minLength": 1,
"maxLength": 160,
"pattern": "^[\\w.:/-]+$"
},
"productId": {
"type": "string",
"minLength": 1,
"maxLength": 160,
"pattern": "^[\\w.:/-]+$"
},
"category": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"relatedEventId": {
"type": "string",
"minLength": 1,
"maxLength": 160,
"pattern": "^[\\w.:/-]+$"
},
"transactionHash": {
"type": "string",
"maxLength": 160
},
"x402PaymentId": {
"type": "string",
"maxLength": 160
},
"metadata": {
"type": "object",
"propertyNames": {
"type": "string",
"maxLength": 80
},
"additionalProperties": {
"$ref": "#/definitions/__schema0"
}
},
"adjustment": {
"type": "object",
"properties": {
"reason": {
"type": "string",
"minLength": 3,
"maxLength": 500
},
"profitTreatment": {
"type": "string",
"enum": [
"revenue",
"cost",
"exclude"
]
}
},
"required": [
"reason",
"profitTreatment"
]
},
"assetPolicy": {
"type": "string",
"enum": [
"expense",
"exclude"
]
}
},
"required": [
"schemaVersion",
"externalId",
"occurredAt",
"kind",
"direction",
"amount",
"currency",
"source",
"category"
]
}
},
"baseCurrency": {
"type": "string",
"pattern": "^[A-Z][A-Z0-9]{1,11}$"
},
"exchangeRates": {
"maxItems": 100,
"type": "array",
"items": {
"type": "object",
"properties": {
"from": {
"type": "string",
"pattern": "^[A-Z][A-Z0-9]{1,11}$"
},
"to": {
"type": "string",
"pattern": "^[A-Z][A-Z0-9]{1,11}$"
},
"rate": {
"type": "string",
"pattern": "^(?:0|[1-9]\\d*)(?:\\.\\d+)?$"
},
"source": {
"type": "string",
"minLength": 1,
"maxLength": 160
},
"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)))$"
}
},
"required": [
"from",
"to",
"rate",
"source",
"effectiveAt"
]
}
},
"currentCashBalance": {
"type": "string"
},
"currentCashBalances": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "string"
}
}
},
"required": [
"events"
],
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"__schema0": {
"anyOf": [
{
"type": "string",
"maxLength": 500
},
{
"type": "boolean"
},
{
"type": "null"
},
{
"maxItems": 20,
"type": "array",
"items": {
"$ref": "#/definitions/__schema0"
}
},
{
"type": "object",
"propertyNames": {
"type": "string",
"maxLength": 80
},
"additionalProperties": {
"$ref": "#/definitions/__schema0"
}
}
]
}
}
}輸出結構描述
{
"type": "object",
"properties": {
"result": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
}
},
"required": [
"result"
],
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false
}🟡workspace_create
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.
輸入結構描述
{
"type": "object",
"properties": {},
"$schema": "http://json-schema.org/draft-07/schema#"
}輸出結構描述
{
"type": "object",
"properties": {
"result": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
}
},
"required": [
"result"
],
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false
}🟡workspace_record_events(workspaceId, capabilityToken, events)
Use workspace_record_events to append revenue, expenses, refunds, fees, capital, withdrawals, and transfers during a 30-day persistent workflow. Requires a write or admin capability token; no additional x402 charge. Events count against quota and remain until expiry or deletion.
輸入結構描述
{
"type": "object",
"properties": {
"workspaceId": {
"type": "string"
},
"capabilityToken": {
"type": "string"
},
"events": {
"minItems": 1,
"maxItems": 1000,
"type": "array",
"items": {
"type": "object",
"properties": {
"schemaVersion": {
"type": "string",
"const": "1"
},
"externalId": {
"type": "string",
"minLength": 1,
"maxLength": 160,
"pattern": "^[\\w.:/-]+$"
},
"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)))$"
},
"kind": {
"type": "string",
"enum": [
"revenue",
"expense",
"refund",
"fee",
"transfer",
"capital",
"withdrawal",
"asset_purchase",
"asset_sale",
"adjustment"
]
},
"direction": {
"type": "string",
"enum": [
"inflow",
"outflow"
]
},
"amount": {
"type": "string",
"pattern": "^(?:0|[1-9]\\d*)(?:\\.\\d+)?$"
},
"currency": {
"type": "string",
"pattern": "^[A-Z][A-Z0-9]{1,11}$"
},
"source": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"type": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"verification": {
"type": "string",
"enum": [
"self_reported",
"receipt_supplied",
"receipt_verified",
"onchain_verified",
"system_observed"
]
},
"reference": {
"type": "string",
"maxLength": 500
}
},
"required": [
"name",
"type",
"verification"
]
},
"agentId": {
"type": "string",
"minLength": 1,
"maxLength": 160,
"pattern": "^[\\w.:/-]+$"
},
"ventureId": {
"type": "string",
"minLength": 1,
"maxLength": 160,
"pattern": "^[\\w.:/-]+$"
},
"experimentId": {
"type": "string",
"minLength": 1,
"maxLength": 160,
"pattern": "^[\\w.:/-]+$"
},
"customerId": {
"type": "string",
"minLength": 1,
"maxLength": 160,
"pattern": "^[\\w.:/-]+$"
},
"productId": {
"type": "string",
"minLength": 1,
"maxLength": 160,
"pattern": "^[\\w.:/-]+$"
},
"category": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"relatedEventId": {
"type": "string",
"minLength": 1,
"maxLength": 160,
"pattern": "^[\\w.:/-]+$"
},
"transactionHash": {
"type": "string",
"maxLength": 160
},
"x402PaymentId": {
"type": "string",
"maxLength": 160
},
"metadata": {
"type": "object",
"propertyNames": {
"type": "string",
"maxLength": 80
},
"additionalProperties": {
"$ref": "#/definitions/__schema0"
}
},
"adjustment": {
"type": "object",
"properties": {
"reason": {
"type": "string",
"minLength": 3,
"maxLength": 500
},
"profitTreatment": {
"type": "string",
"enum": [
"revenue",
"cost",
"exclude"
]
}
},
"required": [
"reason",
"profitTreatment"
]
},
"assetPolicy": {
"type": "string",
"enum": [
"expense",
"exclude"
]
}
},
"required": [
"schemaVersion",
"externalId",
"occurredAt",
"kind",
"direction",
"amount",
"currency",
"source",
"category"
]
}
}
},
"required": [
"workspaceId",
"capabilityToken",
"events"
],
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"__schema0": {
"anyOf": [
{
"type": "string",
"maxLength": 500
},
{
"type": "boolean"
},
{
"type": "null"
},
{
"maxItems": 20,
"type": "array",
"items": {
"$ref": "#/definitions/__schema0"
}
},
{
"type": "object",
"propertyNames": {
"type": "string",
"maxLength": 80
},
"additionalProperties": {
"$ref": "#/definitions/__schema0"
}
}
]
}
}
}輸出結構描述
{
"type": "object",
"properties": {
"result": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
}
},
"required": [
"result"
],
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false
}🟢workspace_get_profit(workspaceId, capabilityToken)
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.
輸入結構描述
{
"type": "object",
"properties": {
"workspaceId": {
"type": "string"
},
"capabilityToken": {
"type": "string"
}
},
"required": [
"workspaceId",
"capabilityToken"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}輸出結構描述
{
"type": "object",
"properties": {
"result": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
}
},
"required": [
"result"
],
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false
}🟢workspace_get_data_quality(workspaceId, capabilityToken)
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.
輸入結構描述
{
"type": "object",
"properties": {
"workspaceId": {
"type": "string"
},
"capabilityToken": {
"type": "string"
}
},
"required": [
"workspaceId",
"capabilityToken"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}輸出結構描述
{
"type": "object",
"properties": {
"result": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
}
},
"required": [
"result"
],
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false
}🟢report_verify(report)
Use report_verify to check the integrity and service signature of historical report schemas 1, 2, or 3. Free, stateless, and no workspace token is required. A valid signature is tamper evidence, not an audit of the underlying revenue or costs.
輸入結構描述
{
"type": "object",
"properties": {
"report": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
}
},
"required": [
"report"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}輸出結構描述
{
"type": "object",
"properties": {
"result": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
}
},
"required": [
"result"
],
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false
}社群
證據