/** * SAP SDK MCP tools. * * This module intentionally wraps only methods that exist on * `@oobe-protocol-labs/synapse-sap-sdk@1.0.x`. It does not create local * facades for missing SDK namespaces and it does not fabricate network data. */ import { Server } from '@modelcontextprotocol/sdk/server/index.js'; import { type RegisterAgentArgs, type UpdateAgentArgs } from '@oobe-protocol-labs/synapse-sap-sdk/types'; import type { SapMcpContext } from '../../core/src/types.js'; type JsonRecord = Record; export declare const SAP_AGENT_CAPABILITY_INPUT_SCHEMA: { readonly oneOf: readonly [{ readonly type: "string"; readonly description: "Capability id shorthand, for example jupiter:swap, pyth:price, metaplex:identity, sns:identity, or risk:management."; }, { readonly type: "object"; readonly properties: { readonly id: { readonly type: "string"; readonly description: "Required stable capability id. Use protocol:action naming, for example jupiter:swap, pyth:price, metaplex:identity, sns:identity, x402:payments, or risk:management."; }; readonly description: { readonly type: "string"; readonly description: "Optional human-readable capability description for agents and explorers."; }; readonly protocolId: { readonly type: "string"; readonly description: "Optional protocol namespace backing this capability, for example sap, mcp, jupiter, pyth, metaplex, sns, x402, or custom."; }; readonly version: { readonly type: "string"; readonly description: "Optional capability version string. Use semver when the capability maps to an API contract."; }; }; readonly required: readonly ["id"]; readonly additionalProperties: false; }]; }; export declare const SAP_AGENT_PRICING_TIER_INPUT_SCHEMA: { readonly type: "object"; readonly properties: { readonly tierId: { readonly type: "string"; readonly description: "Stable tier id, for example default, read, premium, value-action, or enterprise."; }; readonly pricePerCall: { readonly type: "string"; readonly description: "Price per call in the smallest unit of tokenType: lamports for sol, micro-USDC for usdc, or base units for spl."; }; readonly minPricePerCall: { readonly type: "string"; readonly description: "Optional floor price per call in the smallest unit of tokenType."; }; readonly maxPricePerCall: { readonly type: "string"; readonly description: "Optional ceiling price per call in the smallest unit of tokenType."; }; readonly rateLimit: { readonly type: "number"; readonly description: "Maximum calls per second allowed by this tier. Defaults to 60."; }; readonly maxCallsPerSession: { readonly type: "number"; readonly description: "Maximum calls allowed per session for this tier. Defaults to 1000."; }; readonly burstLimit: { readonly type: "number"; readonly description: "Optional short-window burst allowance for this tier."; }; readonly tokenType: { readonly type: "string"; readonly enum: readonly ["sol", "usdc", "spl"]; readonly description: "Payment token type. Use usdc for x402/pay.sh agent commerce. Use spl only with tokenMint."; }; readonly tokenMint: { readonly type: "string"; readonly description: "Optional SPL token mint public key. Required when tokenType is spl. For mainnet USDC use EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v."; }; readonly tokenDecimals: { readonly type: "number"; readonly description: "Decimals for the payment token. Defaults to 6 for usdc and 9 for sol when omitted."; }; readonly settlementMode: { readonly type: "string"; readonly enum: readonly ["instant", "escrow", "batched", "x402"]; readonly description: "Settlement strategy. Use x402 for HTTP 402/pay.sh flows, escrow for prepaid SAP usage ledgers, instant for direct pay-per-call, and batched for periodic settlement."; }; readonly minEscrowDeposit: { readonly type: "string"; readonly description: "Optional minimum escrow deposit in the smallest unit of tokenType."; }; readonly batchIntervalSec: { readonly type: "number"; readonly description: "Optional settlement batch interval in seconds when settlementMode is batched."; }; readonly volumeCurve: { readonly type: "array"; readonly description: "Optional volume discounts. Each item lowers pricePerCall after a call threshold."; readonly items: { readonly type: "object"; readonly properties: { readonly afterCalls: { readonly type: "number"; readonly description: "Call count threshold where this price starts."; }; readonly pricePerCall: { readonly type: "string"; readonly description: "Discounted price per call in the smallest unit of tokenType."; }; }; readonly required: readonly ["afterCalls", "pricePerCall"]; readonly additionalProperties: false; }; }; }; readonly required: readonly ["pricePerCall"]; readonly additionalProperties: false; }; export declare const SAP_AGENT_REGISTER_INPUT_SCHEMA: { readonly name: { readonly type: "string"; readonly description: "Required public display name for the SAP agent. Keep it stable enough for explorers and humans."; }; readonly description: { readonly type: "string"; readonly description: "Required public description of what the agent does, which protocols it can use, and its safety/trust boundaries."; }; readonly capabilities: { readonly type: "array"; readonly description: "Required capability list. Prefer object form for production; strings are accepted as shorthand."; readonly items: { readonly oneOf: readonly [{ readonly type: "string"; readonly description: "Capability id shorthand, for example jupiter:swap, pyth:price, metaplex:identity, sns:identity, or risk:management."; }, { readonly type: "object"; readonly properties: { readonly id: { readonly type: "string"; readonly description: "Required stable capability id. Use protocol:action naming, for example jupiter:swap, pyth:price, metaplex:identity, sns:identity, x402:payments, or risk:management."; }; readonly description: { readonly type: "string"; readonly description: "Optional human-readable capability description for agents and explorers."; }; readonly protocolId: { readonly type: "string"; readonly description: "Optional protocol namespace backing this capability, for example sap, mcp, jupiter, pyth, metaplex, sns, x402, or custom."; }; readonly version: { readonly type: "string"; readonly description: "Optional capability version string. Use semver when the capability maps to an API contract."; }; }; readonly required: readonly ["id"]; readonly additionalProperties: false; }]; }; }; readonly pricing: { readonly type: "array"; readonly description: "Optional pricing tiers advertised by the agent. Use tokenType usdc + settlementMode x402 for pay.sh/x402 agent commerce."; readonly items: { readonly type: "object"; readonly properties: { readonly tierId: { readonly type: "string"; readonly description: "Stable tier id, for example default, read, premium, value-action, or enterprise."; }; readonly pricePerCall: { readonly type: "string"; readonly description: "Price per call in the smallest unit of tokenType: lamports for sol, micro-USDC for usdc, or base units for spl."; }; readonly minPricePerCall: { readonly type: "string"; readonly description: "Optional floor price per call in the smallest unit of tokenType."; }; readonly maxPricePerCall: { readonly type: "string"; readonly description: "Optional ceiling price per call in the smallest unit of tokenType."; }; readonly rateLimit: { readonly type: "number"; readonly description: "Maximum calls per second allowed by this tier. Defaults to 60."; }; readonly maxCallsPerSession: { readonly type: "number"; readonly description: "Maximum calls allowed per session for this tier. Defaults to 1000."; }; readonly burstLimit: { readonly type: "number"; readonly description: "Optional short-window burst allowance for this tier."; }; readonly tokenType: { readonly type: "string"; readonly enum: readonly ["sol", "usdc", "spl"]; readonly description: "Payment token type. Use usdc for x402/pay.sh agent commerce. Use spl only with tokenMint."; }; readonly tokenMint: { readonly type: "string"; readonly description: "Optional SPL token mint public key. Required when tokenType is spl. For mainnet USDC use EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v."; }; readonly tokenDecimals: { readonly type: "number"; readonly description: "Decimals for the payment token. Defaults to 6 for usdc and 9 for sol when omitted."; }; readonly settlementMode: { readonly type: "string"; readonly enum: readonly ["instant", "escrow", "batched", "x402"]; readonly description: "Settlement strategy. Use x402 for HTTP 402/pay.sh flows, escrow for prepaid SAP usage ledgers, instant for direct pay-per-call, and batched for periodic settlement."; }; readonly minEscrowDeposit: { readonly type: "string"; readonly description: "Optional minimum escrow deposit in the smallest unit of tokenType."; }; readonly batchIntervalSec: { readonly type: "number"; readonly description: "Optional settlement batch interval in seconds when settlementMode is batched."; }; readonly volumeCurve: { readonly type: "array"; readonly description: "Optional volume discounts. Each item lowers pricePerCall after a call threshold."; readonly items: { readonly type: "object"; readonly properties: { readonly afterCalls: { readonly type: "number"; readonly description: "Call count threshold where this price starts."; }; readonly pricePerCall: { readonly type: "string"; readonly description: "Discounted price per call in the smallest unit of tokenType."; }; }; readonly required: readonly ["afterCalls", "pricePerCall"]; readonly additionalProperties: false; }; }; }; readonly required: readonly ["pricePerCall"]; readonly additionalProperties: false; }; }; readonly protocols: { readonly type: "array"; readonly items: { readonly type: "string"; }; readonly description: "Required protocol tags the agent supports, for example sap, mcp, jupiter, pyth, metaplex, sns, x402, payments."; }; readonly agentId: { readonly type: "string"; readonly description: "Optional stable lowercase agent id, for example solking. This is separate from the on-chain agent PDA."; }; readonly agentUri: { readonly type: "string"; readonly description: "Optional public HTTPS/IPFS/Arweave/Kommodo URI for the agent profile metadata or profile page. Never use local desktop file paths."; }; readonly metadataUri: { readonly type: "string"; readonly description: "Alias for agentUri. Prefer a public JSON metadata document containing name, description, image, external_url, attributes, sap, metaplex, sns, and x402 fields."; }; readonly x402Endpoint: { readonly type: "string"; readonly description: "Optional public x402 discovery/payment endpoint, usually https://host/.well-known/x402 for external agent services."; }; }; export declare const SAP_AGENT_UPDATE_INPUT_SCHEMA: { readonly name: { readonly type: "string"; readonly description: "Optional replacement display name. Omit to keep the current name."; }; readonly description: { readonly type: "string"; readonly description: "Optional replacement description. Omit to keep the current description."; }; readonly capabilities: { readonly type: "array"; readonly description: "Optional full replacement capability list. Omit to keep current capabilities; do not send only the new item unless replacing the whole list is intended."; readonly items: { readonly oneOf: readonly [{ readonly type: "string"; readonly description: "Capability id shorthand, for example jupiter:swap, pyth:price, metaplex:identity, sns:identity, or risk:management."; }, { readonly type: "object"; readonly properties: { readonly id: { readonly type: "string"; readonly description: "Required stable capability id. Use protocol:action naming, for example jupiter:swap, pyth:price, metaplex:identity, sns:identity, x402:payments, or risk:management."; }; readonly description: { readonly type: "string"; readonly description: "Optional human-readable capability description for agents and explorers."; }; readonly protocolId: { readonly type: "string"; readonly description: "Optional protocol namespace backing this capability, for example sap, mcp, jupiter, pyth, metaplex, sns, x402, or custom."; }; readonly version: { readonly type: "string"; readonly description: "Optional capability version string. Use semver when the capability maps to an API contract."; }; }; readonly required: readonly ["id"]; readonly additionalProperties: false; }]; }; }; readonly pricing: { readonly type: "array"; readonly description: "Optional full replacement pricing tier list. Omit to keep current pricing."; readonly items: { readonly type: "object"; readonly properties: { readonly tierId: { readonly type: "string"; readonly description: "Stable tier id, for example default, read, premium, value-action, or enterprise."; }; readonly pricePerCall: { readonly type: "string"; readonly description: "Price per call in the smallest unit of tokenType: lamports for sol, micro-USDC for usdc, or base units for spl."; }; readonly minPricePerCall: { readonly type: "string"; readonly description: "Optional floor price per call in the smallest unit of tokenType."; }; readonly maxPricePerCall: { readonly type: "string"; readonly description: "Optional ceiling price per call in the smallest unit of tokenType."; }; readonly rateLimit: { readonly type: "number"; readonly description: "Maximum calls per second allowed by this tier. Defaults to 60."; }; readonly maxCallsPerSession: { readonly type: "number"; readonly description: "Maximum calls allowed per session for this tier. Defaults to 1000."; }; readonly burstLimit: { readonly type: "number"; readonly description: "Optional short-window burst allowance for this tier."; }; readonly tokenType: { readonly type: "string"; readonly enum: readonly ["sol", "usdc", "spl"]; readonly description: "Payment token type. Use usdc for x402/pay.sh agent commerce. Use spl only with tokenMint."; }; readonly tokenMint: { readonly type: "string"; readonly description: "Optional SPL token mint public key. Required when tokenType is spl. For mainnet USDC use EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v."; }; readonly tokenDecimals: { readonly type: "number"; readonly description: "Decimals for the payment token. Defaults to 6 for usdc and 9 for sol when omitted."; }; readonly settlementMode: { readonly type: "string"; readonly enum: readonly ["instant", "escrow", "batched", "x402"]; readonly description: "Settlement strategy. Use x402 for HTTP 402/pay.sh flows, escrow for prepaid SAP usage ledgers, instant for direct pay-per-call, and batched for periodic settlement."; }; readonly minEscrowDeposit: { readonly type: "string"; readonly description: "Optional minimum escrow deposit in the smallest unit of tokenType."; }; readonly batchIntervalSec: { readonly type: "number"; readonly description: "Optional settlement batch interval in seconds when settlementMode is batched."; }; readonly volumeCurve: { readonly type: "array"; readonly description: "Optional volume discounts. Each item lowers pricePerCall after a call threshold."; readonly items: { readonly type: "object"; readonly properties: { readonly afterCalls: { readonly type: "number"; readonly description: "Call count threshold where this price starts."; }; readonly pricePerCall: { readonly type: "string"; readonly description: "Discounted price per call in the smallest unit of tokenType."; }; }; readonly required: readonly ["afterCalls", "pricePerCall"]; readonly additionalProperties: false; }; }; }; readonly required: readonly ["pricePerCall"]; readonly additionalProperties: false; }; }; readonly protocols: { readonly type: "array"; readonly items: { readonly type: "string"; }; readonly description: "Optional full replacement protocol list. Omit to keep current protocols."; }; readonly agentId: { readonly type: "string"; readonly description: "Optional replacement stable agent id. Omit to keep current agentId."; }; readonly agentUri: { readonly type: "string"; readonly description: "Optional replacement public URI for agent metadata/profile. Use this to update pictures after uploading metadata to IPFS, Arweave, Kommodo, or HTTPS."; }; readonly metadataUri: { readonly type: "string"; readonly description: "Alias for agentUri. Use a public metadata JSON URI; never use a desktop file path."; }; readonly x402Endpoint: { readonly type: "string"; readonly description: "Optional replacement x402 discovery/payment endpoint. Omit to keep current endpoint."; }; }; /** * @name parseRegisterAgentArgs * @description Builds strongly typed `RegisterAgentArgs` from MCP JSON input. * Runs the full on-chain payload validation (validator.rs parity) so invalid * payloads fail at parse time with an actionable message instead of as an * RPC simulation Anchor error after signing. */ export declare function parseRegisterAgentArgs(input: JsonRecord): RegisterAgentArgs; /** * @name parseUpdateAgentArgs * @description Builds strongly typed `UpdateAgentArgs` from MCP JSON input. * Only present fields are validated (None = skip), mirroring validator.rs * validate_update. */ export declare function parseUpdateAgentArgs(input: JsonRecord): UpdateAgentArgs; /** * @name registerSapSdkTools * @description Registers production SAP SDK-backed tools using the current public SDK v1.0.x client surface. */ export declare function registerSapSdkTools(server: Server, context: SapMcpContext): void; export {}; //# sourceMappingURL=sap-sdk-tools.d.ts.map