Files
apex-mcp-server/packages/builder/test/smoke/tool-schemas.snapshot.json
FilipBl4gojevic 04f2d873ca feat(builder)!: agent-registry family keyless - build_* tools, @ts-nocheck dropped, custody allowlist shrinks to 1
Rewrites agent-network.ts as a typed, keyless module: the five custodial
signing tools (vector_register_agent, vector_update_agent,
vector_transfer_agent, vector_deregister_agent, vector_message_agent) are
replaced by unsigned-build equivalents (vector_build_register_agent,
vector_build_update_agent, vector_build_transfer_agent,
vector_build_deregister_agent, vector_build_message_agent) that take no
mnemonic - the 4-call flow is get_address -> build_* -> signer sign ->
submit -> confirm. The two read-only tools (vector_get_agent_profile,
vector_discover_agents) keep identical behavior, description, and schema,
now backed by registry-build.ts's typed helpers (Tasks 2-3) instead of
local duplicated logic.

@ts-nocheck is dropped - the file now typechecks clean under strict mode
(server.tool()'s generic inference did not explode; the TS2589 concern
that originally motivated @ts-nocheck is confirmed dead under zod/v4).

boundary.test.ts: CUSTODIAL_UNTIL_LATER_PR shrinks from
{agent-network.ts, self-improvement.ts} to {self-improvement.ts} - size
pin 2 -> 1, message updated for spec PR 8 (the last remaining family).

tool-inventory.test.ts: EXPECTED_TOOLS updated for the 5 renames,
alphabetical order preserved, count stays 23.

tool-schemas.snapshot.json regenerated; delta verified surgical - exactly
the 5 old names removed and 5 new names added, all other 18 entries
(11 vector.ts + 5 self-improvement + the 2 unchanged read-only agent
tools) byte-identical.

Also fixes a stale cross-reference this rename exposed:
self-improvement.ts's registry-NFT-not-found error told the caller to
"re-register with vector_register_agent", a tool name that no longer
exists post-rename. Updated to vector_build_register_agent. This is the
only reference to the old names left in packages/builder/src outside the
deferred integration test (test/integration/run.test.ts, explicitly
scoped to a later task per progress.md).

One addition beyond the task brief (Task 3 review, M-c context): the
build_deregister_agent troubleshooting copy gets a 4th tip pointing at
registry-build.ts's I-1 error (deregistration needs a plain AP3X-only
UTxO to clear the validator's returned-change floor).

Gates: typecheck 0, unit 350/350, smoke 26/26 (23 tools), auth+rate-limit
12/12, boundary 4/4.
2026-07-29 18:33:07 +02:00

849 lines
28 KiB
JSON

{
"vector_await_transaction": {
"description": "Wait for a submitted transaction to be confirmed on Vector. Polls until it appears on-chain or the timeout elapses.",
"inputSchema": {
"type": "object",
"properties": {
"txHash": {
"description": "Transaction hash returned by vector_submit_transaction",
"type": "string"
},
"timeoutSeconds": {
"description": "How long to wait before giving up (default: 120)",
"type": "number",
"minimum": 1,
"maximum": 300
}
},
"required": [
"txHash"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
"vector_build_deploy_contract": {
"description": "Build an UNSIGNED transaction deploying a Plutus/Aiken smart contract (locks funds at its script address). Takes no key material - sign with your local signer, then broadcast with vector_submit_transaction and confirm with vector_await_transaction.",
"inputSchema": {
"type": "object",
"properties": {
"changeAddress": {
"description": "Your wallet address (source of funds; receives change). Get it from your local signer's vector_signer_get_address.",
"type": "string"
},
"scriptCbor": {
"description": "Compiled Plutus/Aiken script in CBOR hex format",
"type": "string"
},
"scriptType": {
"description": "Script version",
"type": "string",
"enum": [
"PlutusV1",
"PlutusV2",
"PlutusV3"
]
},
"initialDatum": {
"description": "Initial datum as CBOR hex. Use 'd87980' for void/unit datum. Defaults to void if omitted.",
"type": "string"
},
"lovelaceAmount": {
"description": "AP3X to lock at the script address in lovelace (default: 2,000,000 = 2 AP3X)",
"type": "number"
}
},
"required": [
"changeAddress",
"scriptCbor",
"scriptType"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
"vector_build_deregister_agent": {
"description": "Build an UNSIGNED transaction that deregisters an agent (burns the identity NFT, returns the 10 AP3X deposit to the owner wallet). Takes no key material. Sign locally with vector_signer_sign, broadcast with vector_submit_transaction, then confirm with vector_await_transaction.",
"inputSchema": {
"type": "object",
"properties": {
"changeAddress": {
"description": "The agent OWNER's wallet address (receives the returned deposit). Get it from vector_signer_get_address.",
"type": "string"
},
"agent_id": {
"description": "Agent DID to deregister: did:vector:agent:{policyId}:{nftAssetName}",
"type": "string"
}
},
"required": [
"changeAddress",
"agent_id"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
"vector_build_interact_contract": {
"description": "Build an UNSIGNED transaction interacting with a deployed Plutus/Aiken contract - lock AP3X at it or spend from it. Takes no key material - sign with your local signer, then broadcast with vector_submit_transaction and confirm with vector_await_transaction.",
"inputSchema": {
"type": "object",
"properties": {
"changeAddress": {
"description": "Your wallet address (source of funds, change, and the required signer for spends). Get it from your local signer's vector_signer_get_address.",
"type": "string"
},
"scriptCbor": {
"description": "Compiled Plutus/Aiken script in CBOR hex",
"type": "string"
},
"scriptType": {
"description": "Script version",
"type": "string",
"enum": [
"PlutusV1",
"PlutusV2",
"PlutusV3"
]
},
"action": {
"description": "'spend' to collect UTxOs from the script, 'lock' to send funds to it",
"type": "string",
"enum": [
"spend",
"lock"
]
},
"redeemer": {
"description": "Redeemer as CBOR hex (required for spend, use 'd87980' for void)",
"type": "string"
},
"datum": {
"description": "Datum as CBOR hex (required for lock, use 'd87980' for void)",
"type": "string"
},
"lovelaceAmount": {
"description": "Lovelace to lock (for lock action, default: 2,000,000 = 2 AP3X)",
"type": "number"
},
"utxoRef": {
"description": "Specific UTxO to spend from (optional, otherwise spends all UTxOs at script address)",
"type": "object",
"properties": {
"txHash": {
"type": "string"
},
"outputIndex": {
"type": "number"
}
},
"required": [
"txHash",
"outputIndex"
]
},
"assets": {
"description": "Additional native assets for lock action: { 'policyId+assetNameHex': 'quantity' }",
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "string"
}
}
},
"required": [
"changeAddress",
"scriptCbor",
"scriptType",
"action"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
"vector_build_message_agent": {
"description": "Build an UNSIGNED transaction that sends an on-chain message to a registered agent via TX metadata (label 674), delivering 2 AP3X to the agent's owner address. Takes no key material. Sign locally with vector_signer_sign, broadcast with vector_submit_transaction, then confirm with vector_await_transaction.",
"inputSchema": {
"type": "object",
"properties": {
"changeAddress": {
"description": "Your wallet address (pays the 2 AP3X delivery and fee; recorded as the sender). Get it from vector_signer_get_address.",
"type": "string"
},
"agent_id": {
"description": "Recipient agent DID: did:vector:agent:{policyId}:{nftAssetName}",
"type": "string"
},
"message_type": {
"description": "Type of message",
"type": "string",
"enum": [
"inquiry",
"proposal",
"result"
]
},
"payload": {
"description": "Message payload (string, max 512 chars)",
"type": "string",
"maxLength": 512
}
},
"required": [
"changeAddress",
"agent_id",
"message_type",
"payload"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
"vector_build_register_agent": {
"description": "Build an UNSIGNED transaction that registers an agent in the Vector on-chain registry (mints a soulbound identity NFT, locks a 10 AP3X deposit). Takes no key material. Sign locally with vector_signer_sign, broadcast with vector_submit_transaction, then confirm with vector_await_transaction.",
"inputSchema": {
"type": "object",
"properties": {
"changeAddress": {
"description": "Your wallet address (source of the deposit and change). Get it from vector_signer_get_address.",
"type": "string"
},
"name": {
"description": "Agent name (e.g. 'TradingBot', 'ResearchAgent')",
"type": "string",
"minLength": 1,
"maxLength": 64
},
"description": {
"description": "Short description of the agent's purpose",
"type": "string",
"maxLength": 256
},
"capabilities": {
"description": "List of capability tags (e.g. ['investing', 'research', 'environmental'])",
"type": "array",
"items": {
"type": "string"
}
},
"framework": {
"description": "Framework used (e.g. 'OpenClaw', 'LangChain', 'CrewAI', 'custom')",
"type": "string"
},
"endpoint": {
"description": "A2A communication endpoint URL (or empty string if not applicable)",
"type": "string"
}
},
"required": [
"changeAddress",
"name",
"description",
"capabilities",
"framework",
"endpoint"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
"vector_build_send_apex": {
"description": "Build an UNSIGNED transaction sending AP3X to a recipient. Takes no key material - sign the returned CBOR with your local signer (vector_signer_sign), then broadcast with vector_submit_transaction and confirm with vector_await_transaction.",
"inputSchema": {
"type": "object",
"properties": {
"changeAddress": {
"description": "Your wallet address (source of funds; receives change). Get it from your local signer's vector_signer_get_address.",
"type": "string"
},
"recipientAddress": {
"description": "Recipient Vector address (addr1...)",
"type": "string"
},
"amount": {
"description": "Amount of AP3X to send",
"type": "number",
"minimum": 1
},
"metadata": {
"description": "Optional transaction metadata in JSON format",
"type": "string"
}
},
"required": [
"changeAddress",
"recipientAddress",
"amount"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
"vector_build_send_tokens": {
"description": "Build an UNSIGNED transaction sending Vector native tokens. Takes no key material - sign the returned CBOR with your local signer (vector_signer_sign), then broadcast with vector_submit_transaction and confirm with vector_await_transaction.",
"inputSchema": {
"type": "object",
"properties": {
"changeAddress": {
"description": "Your wallet address (source of funds; receives change). Get it from your local signer's vector_signer_get_address.",
"type": "string"
},
"recipientAddress": {
"description": "Recipient Vector address (addr1...)",
"type": "string"
},
"policyId": {
"description": "Token policy ID (56 hex characters)",
"type": "string"
},
"assetName": {
"description": "Asset name (text or hex; can be empty for policy-only tokens)",
"type": "string"
},
"amount": {
"description": "Amount of tokens to send",
"type": "string"
},
"adaAmount": {
"description": "Optional AP3X to include with the tokens (defaults to the 2 AP3X minimum)",
"type": "number"
}
},
"required": [
"changeAddress",
"recipientAddress",
"policyId",
"assetName",
"amount"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
"vector_build_transaction": {
"description": "Build an UNSIGNED multi-output transaction with optional metadata. Takes no key material and never submits - sign the returned CBOR with your local signer (vector_signer_sign), then broadcast with vector_submit_transaction and confirm with vector_await_transaction.",
"inputSchema": {
"type": "object",
"properties": {
"changeAddress": {
"description": "Your wallet address (source of funds; receives change). Get it from your local signer's vector_signer_get_address.",
"type": "string"
},
"outputs": {
"description": "Transaction outputs",
"minItems": 1,
"type": "array",
"items": {
"type": "object",
"properties": {
"address": {
"description": "Recipient Vector address",
"type": "string"
},
"lovelace": {
"description": "Amount in lovelace (1 AP3X = 1,000,000 lovelace)",
"type": "number"
},
"assets": {
"description": "Optional native assets: { 'policyId+assetNameHex': 'quantity' }",
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "string"
}
}
},
"required": [
"address",
"lovelace"
]
}
},
"metadata": {
"description": "Optional JSON metadata (attached under label 674)",
"type": "string"
}
},
"required": [
"changeAddress",
"outputs"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
"vector_build_transfer_agent": {
"description": "Build an UNSIGNED transaction that transfers agent ownership to a new address (must be a verification-key address, not a script). Takes no key material. Sign locally with vector_signer_sign, broadcast with vector_submit_transaction, then confirm with vector_await_transaction.",
"inputSchema": {
"type": "object",
"properties": {
"changeAddress": {
"description": "The CURRENT owner's wallet address. Get it from vector_signer_get_address.",
"type": "string"
},
"agent_id": {
"description": "Agent DID to transfer: did:vector:agent:{policyId}:{nftAssetName}",
"type": "string"
},
"new_owner_address": {
"description": "Bech32 address of the new owner (must be a verification key address, not a script address)",
"type": "string"
}
},
"required": [
"changeAddress",
"agent_id",
"new_owner_address"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
"vector_build_update_agent": {
"description": "Build an UNSIGNED transaction that updates a registered agent's profile fields. Only the specified fields change; others are preserved. Takes no key material - the on-chain validator requires the owner's signature, which you add locally with vector_signer_sign before vector_submit_transaction, then confirm with vector_await_transaction.",
"inputSchema": {
"type": "object",
"properties": {
"changeAddress": {
"description": "The agent OWNER's wallet address. Get it from vector_signer_get_address.",
"type": "string"
},
"agent_id": {
"description": "Agent DID to update: did:vector:agent:{policyId}:{nftAssetName}",
"type": "string"
},
"name": {
"description": "New agent name",
"type": "string",
"minLength": 1,
"maxLength": 64
},
"description": {
"description": "New description",
"type": "string",
"maxLength": 256
},
"capabilities": {
"description": "New capability tags (replaces existing list)",
"type": "array",
"items": {
"type": "string"
}
},
"framework": {
"description": "New framework identifier",
"type": "string"
},
"endpoint": {
"description": "New A2A endpoint URL (or empty string to clear)",
"type": "string"
}
},
"required": [
"changeAddress",
"agent_id"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
"vector_discover_agents": {
"description": "Discover registered agents in the Vector on-chain registry, optionally filtered by capability or framework",
"inputSchema": {
"type": "object",
"properties": {
"capability": {
"description": "Filter by capability tag (e.g. 'investing', 'research')",
"type": "string"
},
"framework": {
"description": "Filter by framework (e.g. 'OpenClaw', 'LangChain', 'CrewAI')",
"type": "string"
},
"limit": {
"description": "Maximum number of agents to return (default: 20)",
"default": 20,
"type": "number"
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
"vector_dry_run": {
"description": "Simulate a transaction without submitting - returns fee estimate and validation result. Accepts either built CBOR or outputs to build from (keyless).",
"inputSchema": {
"type": "object",
"properties": {
"txCbor": {
"description": "Hex-encoded CBOR of a built transaction to evaluate",
"type": "string"
},
"outputs": {
"description": "If no txCbor provided, build an unsigned TX from these outputs and evaluate it",
"type": "array",
"items": {
"type": "object",
"properties": {
"address": {
"description": "Recipient Vector address",
"type": "string"
},
"lovelace": {
"description": "Amount in lovelace",
"type": "number"
},
"assets": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "string"
}
}
},
"required": [
"address",
"lovelace"
]
}
},
"changeAddress": {
"description": "Your wallet address (required when building from outputs)",
"type": "string"
},
"metadata": {
"description": "Optional JSON metadata when building from outputs",
"type": "string"
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
"vector_get_agent_profile": {
"description": "Get a registered agent's profile from the on-chain registry by DID (did:vector:agent:...)",
"inputSchema": {
"type": "object",
"properties": {
"agent_id": {
"description": "Agent DID: did:vector:agent:{policyId}:{nftAssetName}",
"type": "string"
}
},
"required": [
"agent_id"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
"vector_get_balance": {
"description": "Get AP3X and token balances for a Vector address",
"inputSchema": {
"type": "object",
"properties": {
"address": {
"description": "Vector address to check (addr1...)",
"type": "string"
}
},
"required": [
"address"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
"vector_get_transaction_history": {
"description": "Get transaction history for a Vector address via Koios indexed queries",
"inputSchema": {
"type": "object",
"properties": {
"address": {
"description": "Vector address to query (addr1...)",
"type": "string"
},
"limit": {
"description": "Number of transactions to return (default: 20, max: 50)",
"type": "number",
"minimum": 1,
"maximum": 50
},
"offset": {
"description": "Offset for pagination (default: 0)",
"type": "number",
"minimum": 0
}
},
"required": [
"address"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
"vector_get_utxos": {
"description": "List unspent transaction outputs (UTxOs) for a Vector address",
"inputSchema": {
"type": "object",
"properties": {
"address": {
"description": "Vector address to query UTxOs for (addr1...)",
"type": "string"
}
},
"required": [
"address"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
"vector_self_improvement_analyze_metrics": {
"description": "Analyze proposal metrics: proposal activity, adoption rate, treasury health, and engagement statistics. Read-only - no mnemonic needed.",
"inputSchema": {
"type": "object",
"properties": {
"focus": {
"description": "Analysis focus area",
"default": "overview",
"type": "string",
"enum": [
"overview",
"adoption",
"treasury",
"activity"
]
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
"vector_self_improvement_browse": {
"description": "Browse improvement proposals, critiques, and endorsements. Query on-chain UTxOs at the module's script addresses and decode datums into human-readable format.",
"inputSchema": {
"type": "object",
"properties": {
"entity": {
"description": "What to browse",
"type": "string",
"enum": [
"proposals",
"critiques",
"endorsements",
"treasury"
]
},
"state": {
"description": "Filter proposals by state: Open, Amended, Adopted, Rejected, Expired, Withdrawn",
"type": "string"
},
"proposalType": {
"description": "Filter proposals by type: ParameterChange, TreasurySpend, ProtocolUpgrade, GameActivation, GeneralSuggestion",
"type": "string"
},
"proposerDid": {
"description": "Filter by proposer DID (hex)",
"type": "string"
},
"proposalTxHash": {
"description": "Filter critiques/endorsements by the proposal they reference",
"type": "string"
}
},
"required": [
"entity"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
"vector_self_improvement_critique": {
"description": "Submit a critique on an improvement proposal. Critiques can support, oppose, or propose amendments. Requires staking AP3X. Provide critiqueDocument (JSON string) for automatic IPFS upload, or critiqueHash + storageUri manually.",
"inputSchema": {
"type": "object",
"properties": {
"mnemonic": {
"description": "15 or 24-word BIP39 mnemonic for the wallet",
"type": "string"
},
"agentDid": {
"description": "Agent DID (hex)",
"type": "string"
},
"proposalTxHash": {
"description": "TX hash of the proposal UTxO to critique",
"type": "string"
},
"proposalOutputIndex": {
"description": "Output index of the proposal UTxO",
"default": 0,
"type": "number"
},
"critiqueDocument": {
"description": "Full critique document as JSON string. Uploaded to IPFS via Filebase; hash and CID computed automatically.",
"type": "string"
},
"critiqueHash": {
"description": "blake2b_256 hash of critique document (64 hex chars). Required if critiqueDocument is not provided.",
"type": "string"
},
"critiqueType": {
"description": "Type of critique",
"type": "string",
"enum": [
"Supportive",
"Opposing",
"Amendment"
]
},
"storageUri": {
"description": "Off-chain storage URI for the critique document. Required if critiqueDocument is not provided.",
"type": "string"
},
"stakeApex": {
"description": "AP3X to stake (minimum 10)",
"type": "number",
"minimum": 10
}
},
"required": [
"mnemonic",
"agentDid",
"proposalTxHash",
"critiqueType",
"stakeApex"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
"vector_self_improvement_endorse": {
"description": "Endorse an improvement proposal by staking AP3X. Endorsements signal support to the Foundation Council and are weighted by stake amount.",
"inputSchema": {
"type": "object",
"properties": {
"mnemonic": {
"description": "15 or 24-word BIP39 mnemonic for the wallet",
"type": "string"
},
"agentDid": {
"description": "Agent DID (hex)",
"type": "string"
},
"proposalTxHash": {
"description": "TX hash of the proposal UTxO to endorse",
"type": "string"
},
"proposalOutputIndex": {
"description": "Output index of the proposal UTxO",
"default": 0,
"type": "number"
},
"stakeApex": {
"description": "AP3X to stake as endorsement (minimum 5)",
"type": "number",
"minimum": 5
}
},
"required": [
"mnemonic",
"agentDid",
"proposalTxHash",
"stakeApex"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
"vector_self_improvement_submit_proposal": {
"description": "Submit an improvement proposal to the Vector Self-Improvement Module. Requires staking AP3X. Provide proposalDocument (JSON string) for automatic IPFS upload via Filebase and blake2b_256 hashing, OR provide proposalHash and storageUri manually.",
"inputSchema": {
"type": "object",
"properties": {
"mnemonic": {
"description": "15 or 24-word BIP39 mnemonic for the wallet",
"type": "string"
},
"agentDid": {
"description": "Agent DID (hex) - the asset name from Agent Registry NFT",
"type": "string"
},
"proposalDocument": {
"description": "Full proposal document as JSON string. Uploaded to IPFS via Filebase; hash and CID computed automatically. If provided, proposalHash and storageUri are ignored.",
"type": "string"
},
"proposalHash": {
"description": "blake2b_256 hash of proposal document (64 hex chars). Required if proposalDocument is not provided.",
"type": "string"
},
"proposalType": {
"description": "Category of the proposal",
"type": "string",
"enum": [
"ParameterChange",
"TreasurySpend",
"ProtocolUpgrade",
"GameActivation",
"GeneralSuggestion"
]
},
"storageUri": {
"description": "Off-chain storage URI for the full proposal (IPFS CID or OriginTrail UAL). Required if proposalDocument is not provided.",
"type": "string"
},
"stakeApex": {
"description": "AP3X to stake (minimum 25)",
"type": "number",
"minimum": 25
},
"typeParams": {
"description": "Type-specific parameters (required for ParameterChange and TreasurySpend)",
"type": "object",
"properties": {
"paramName": {
"type": "string"
},
"currentValue": {
"type": "number"
},
"proposedValue": {
"type": "number"
},
"amount": {
"type": "number"
},
"recipientDescription": {
"type": "string"
},
"upgradeHash": {
"type": "string"
},
"gameId": {
"type": "number"
}
}
},
"priority": {
"description": "Priority level (Emergency requires higher stake and reputation)",
"default": "Standard",
"type": "string",
"enum": [
"Standard",
"Emergency"
]
}
},
"required": [
"mnemonic",
"agentDid",
"proposalType",
"stakeApex"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
"vector_submit_transaction": {
"description": "Submit an already-signed transaction to Vector. Use this to broadcast CBOR signed elsewhere (for example by a local signer). Does not sign anything.",
"inputSchema": {
"type": "object",
"properties": {
"signedTxCbor": {
"description": "Hex-encoded CBOR of a fully signed transaction",
"type": "string"
}
},
"required": [
"signedTxCbor"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}
}
}