MCP tools
Status: Available since v0.1.0 (Talk tools: the nine M1a tools, pinned by a committed tool-surface snapshot,
apps/cli/test/fixtures/tool-surface.json) and Planned for v0.2.0 (M1) (file and proof tools). Current for v0.4.6 (31 Oct 2026): the tool surface did not change in 0.4.6; what changed is behaviour, described under "Paused agents" and "Received files" below. This page lists the tool surface from D-53 and D-55 and 06 MCP server. Names and schemas may change before 1.0.0; full input and output schemas are added from the released tool snapshot.
Package: @4thtech-io/agentlink, subcommand agentlink mcp (stdio). The self-hosted cloud agent exposes the same tools over streamable HTTP with OAuth.
Design rules
Same tools everywhere: local and cloud expose identical names, schemas and annotations.
Status-driven results: every tool returns
status(ok,submitted,pending_approval,needs_setup,needs_credits,not_found,rejected,error), a one-sentence summary and, when notok, anextStep.No dangerous tools: no tool changes policies, exports keys, adds storage credentials, decides approvals or reads arbitrary files.
Untrusted inbound content is always wrapped in an
<untrusted_content>block.Idempotency: mutating tools accept an optional
clientRequestId.Approvals: a tool that can return
pending_approvalacceptsapprovalId; an approved ID lets the identical action proceed once. For terms, one approval covers the acceptance and its Accepted receipt, bound to the exact terms, contact, conversation and expiry, and is void if the terms change.Terms: offers, counters, acceptances and rejections go only through
agentlink_propose_termsandagentlink_respond_to_terms, with typed terms fields.
Tools
agentlink_status
yes
—
v0.1.0 (credits and prices: next release)
agentlink_create_invite
no
—
v0.1.0
agentlink_accept_invite
no
contacts.acceptInvites
v0.1.0
agentlink_list_contacts
yes
—
v0.1.0
agentlink_send
no
proofs.* with notarize
v0.1.0 (path and notarize: next release)
agentlink_propose_terms
no
commitments.accept and proofs.* with notarize (firm offer)
v0.1.0 (notarize accepted next release; firm offers v0.2.0)
agentlink_respond_to_terms
no
commitments.accept (one approval per agreement); proofs.* with notarize
v0.1.0 (notarize accepted next release; recorded accepts v0.2.0)
agentlink_inbox
no (marks items read)
—
v0.1.0
agentlink_get_approval
yes
—
v0.1.0
agentlink_fetch_file
no (saves a file)
—
next release
agentlink_notarize
no
proofs.*
next release
agentlink_acknowledge
no
commitments.accept (records without terms)
next release
agentlink_get_proof
yes
—
next release
agentlink_export_proof_pack
no (writes a file)
proofs.allowKeyDisclosure
next release
agentlink_verify_proof_pack
yes
—
next release
File tools (next release, M1-9d-1)
agentlink_sendwithpath(06 §2.2, §2.3):pathis the full path of one file (~/allowed; 1 to 4096 characters, no control character).text,bodyorpathis required;textandbodyexclude each other. Before the core is called, the path is resolved with realpath and must be strictly inside afiles.allowedFoldersentry (04 §4); the file is not opened. Results:needs_setupwithNO_ALLOWED_FOLDERorOUTSIDE_ALLOWED_FOLDER(also for a link that points outside);rejectedPATH_NOT_ALLOWED(relative,.or.., hidden, protected, not a regular file);not_foundFILE_NOT_FOUND;needs_setupNEEDS_OWN_STORAGE(above the drop's size or weekly limit, orfiles.storage: ownwith none set up);rejectedFILE_TOO_LARGE,PAYLOAD_TOO_LARGE,POLICY_DENIED;errorSTORAGE_UNAVAILABLE,STORAGE_FAILED,FILE_CHANGED,FILES_UNAVAILABLE. Onok,fileis{name, size, plaintextSha256, delivery: inline | drop | own, expiresAt}: never a link, a locator or a key.agentlink_fetch_file(06 §2.3):{envelopeId, fileIndex? = 0}(0 to 15). Onok:{savedTo, name, size, integrity: "verified"};nameand the last segment ofsavedToare the sender's sanitised text, so the text result shows the name only inside the untrusted block. Refusals:not_found;rejectedFILE_TOO_LARGE,INTEGRITY_FAILED,LINK_EXPIRED,URL_REFUSED,POLICY_DENIED;errorINBOX_UNAVAILABLE,DOWNLOAD_FAILED,FILES_UNAVAILABLE. Annotations: not read-only (it writes a file), not idempotent (each call saves a new copy), open world.agentlink_status:storage.modeis where files above about 12 KB go under the current rules (droporown).
Received files and agentlink_fetch_file (since 0.4.6, D-142)
Files from contacts you keep are now saved automatically by the agent itself, without any tool call (see Files). agentlink_fetch_file still works with the same input, output and statuses and is your request, so the automatic-saving limits, the off switch and "Ask before saving" do not hold it back. It shares one lock per file with automatic saving and with Save in the app. When the file was already saved and the saved copy still hashes to the expected SHA-256 and size, it answers {savedTo, name, size, integrity: "verified"} from that copy without downloading again and without writing a second copy. If the copy was moved, deleted or changed, it downloads again under a new name while the link is valid.
Paused agents (since 0.4.6, D-143 (5))
While the owner has paused an agent in the app, the tools that send or fetch (agentlink_send, agentlink_acknowledge, agentlink_propose_terms, agentlink_respond_to_terms, agentlink_notarize, agentlink_create_invite, agentlink_accept_invite, agentlink_fetch_file) return rejected with code: "AGENT_PAUSED" and the fixed nextStep "This AgentLink ID is paused. The owner can resume it in the AgentLink app." The call is refused before any effect, is not queued and is not kept under its clientRequestId, so the same call works after Resume. The read tools (agentlink_status, agentlink_inbox, agentlink_list_contacts, agentlink_get_approval, agentlink_get_proof, agentlink_export_proof_pack, agentlink_verify_proof_pack) answer from what the store holds with no relay fetch, and agentlink_status adds the same fixed line. No tool, argument, result field or annotation was added, and no tool or command pauses or resumes an agent (I-4). Pause is one click in the app with no Touch ID; Resume needs Touch ID and signs agent.resume.
Proof tools (next release, M1-9d-2)
Proofs run on test networks only. They need the 4thTech proof submitter and test credits to be running; until then a proof stays submitted and is sent again later. The network is chosen automatically (D-40); no default input asks for one.
agentlink_notarize(06 §2.4):{envelopeId, requestReceipt?, approvalId?, clientRequestId?}for a message this agent sent. The proof network is picked automatically. Onlyagentlink mcp --advancedaddschain?, an override (a supported network's key) used only when the user asks; an unknown one isrejectedUNSUPPORTED_CHAIN. On the default surface achainargument is refused withINVALID_ARGUMENT(M1-36h). Results (a ProofStatus:recordId,fee {token, amount, usd},receipts, and the proof network only asadvanced.chain):ok;submitted;needs_creditswithagentAddressandtopUpUrl(the deposit page,https://pay.agentlink.4thtech.io/; the link carries nothing else);pending_approval(policyproofs.*);errorUSE_TERMS_TOOLSfor anoffer,acceptorreject(nothing is recorded),RECORD_FAILED,RECORD_CONFLICT,CHAIN_UNAVAILABLE,PROOFS_UNAVAILABLE,NETWORK;not_foundENVELOPE_NOT_FOUND;rejectedNOT_NOTARIZABLE,POLICY_DENIED,CARD_EXPIRED,UNSUPPORTED_CHAIN,APPROVAL_INVALID,POLICY_CHANGED.notarizeonagentlink_send(06 §2.2): the message is sent, then recorded under the sameproofs.*policy asagentlink_notarize. The result addsproof(a ProofStatus); a proof that is pending, submitted or short of credits gives the result its status, and a failed proof giveserrorwithproof.status: "error"and a fixed code, with the send fields kept; the summary always says the message was sent. Apending_approvalis finished withagentlink_notarizeand theenvelopeId; a repeat ofagentlink_sendwithapprovalIdmust carry the first call'sclientRequestId(otherwiseINVALID_ARGUMENT, nothing sent).notarizeonagentlink_propose_termsandagentlink_respond_to_terms(06 §2.2a): accepted by the schema and passed to the core, which does not record offers or answers yet:errorNOTARIZE_UNAVAILABLE, nothing sent or signed. Firm offers and recorded accepts come with v0.2.0.agentlink_acknowledge(06 §2.4):{envelopeId, type: opened | accepted | rejected, approvalId?, clientRequestId?}on a message a contact recorded.openedonly when the user asked to open it. Results:ok{recordId, receipt};submitted(signed, not on record yet);pending_approval(commitments.acceptfor accepted or rejected);errorUSE_RESPOND_TO_TERMSfor a record with terms (nothing signed);not_foundNOT_RECORDED,ENVELOPE_NOT_FOUND;rejectedRECEIPT_CONFLICT,POLICY_DENIED,APPROVAL_INVALID.agentlink_get_proof(06 §2.4): exactly one ofenvelopeIdandrecordId. Read-only. A ProofStatus by the stored state:ok,submitted,needs_credits,error, ornot_found.agentlink_export_proof_pack(06 §2.4, 07 §8): exactly one ofenvelopeIdandrecordId, plusincludeContentKey?(default false; needs the owner's approval,proofs.allowKeyDisclosure) andincludeRecipient?(default false). Writes a new file intoproofs.exportFolder(~/AgentLink/Proofsby default); nothing is written before the approval. Onok:{savedTo, recordId}, never the pack or a key. Refusals:not_foundNOT_RECORDED,ENVELOPE_NOT_FOUND;errorRECORD_UNAVAILABLE(a record a contact made),EXPORT_FOLDER_UNAVAILABLE;rejectedPOLICY_DENIED,APPROVAL_INVALID.agentlink_verify_proof_pack(06 §2.4, D-87): exactly one ofpathandjson.pathmust be strictly insideproofs.exportFolderorfiles.inboxFolder(a relative path is below the proofs folder): a path outside both is refused before the disk is touched; then realpath, no hidden or protected files, no links, a regular file of at most 256 KiB. Refusals arerejectedPATH_NOT_ALLOWED,PACK_TOO_LARGE,PACK_INVALID, with no path or content echoed. Onok:{valid, verdict: verified | record_only | failed, advanced: {chain}, recordId, signer, signerName?, signerLabel?, timestamp, envelopeHash, receipts, contentVerified}.signerNamefollows the contact-name rule: the contact's alias or restricted name, otherwise "Contact" with the short ID tag.record_onlyis never shown as a full pass (D-95). Disclosed content appears only inside the untrusted block.errorNETWORKwhen the public record does not answer.agentlink_status:credits[{usd, advanced: {chain, token, amount}}](network and token names only underadvanced, D-40),prices[{action: "notarize", usd, protocolUsd, integratorUsd, payFrom: "credits"}](the AgentLink part and the app part shown separately, G-43),agentAddressandtopUpUrl. Read within about 3 seconds; left out when no network answers.
Outline (filled in at release)
Per tool: purpose, input schema, output schema, annotations, status values, examples
The untrusted-content format
Server instructions sent at initialize
The approval flow from a tool's point of view
Changes between versions (from the changelog)
Filled in at: M1a (v0.1.0) and M1 (v0.2.0); backlog cards DOCS-M1a and DOCS-M1b.
Last updated
