Link Commands
A Model Context Protocol (MCP) client can read documentation and call the Local Link commands you expose. Link agents get this tool by default, so they can explain what is enabled and help you discover more.
Connect a Client
The Model Context Protocol (MCP) lets an agent discover named tools and call them with structured arguments. Configure a client to start lnk mcp over standard input and output. The server offers commands declared as tools by installed modules, including man, agent context reads and box lifecycle commands.
lnk mcpBind an Agent
Bind agent commands to a name or stable agent ID when you configure the client. Managed Link agents use their stable ID, so reusing a name cannot redirect the agent's tool. The server then removes the agent selector from model inputs and refuses any attempt to override it.
lnk mcp --agent mainInspect Allowed Reads
Print the read-only call names as a JSON array without starting the server. Agent startup uses this same projection to configure the sandbox's allowlist.
lnk mcp --read-callsAsk Your Agent About Local Link
Ask your agent what it can do or how to enable a capability. The agent's Link tool can read the offline manual, inspect the agent's status, and list its enabled tools. Installation alone does not enable a capability, and the agent cannot grant itself more access.
Remove or Add the Tool
The Link tool starts enabled. Remove it to withhold these command tools, or add it again later. Both commands save the agent's tool switch, and a stopped agent uses the change at its next start.
Restart the Running Agent
A background agent asks before restarting with the change. Approve that question in the terminal, or use --yes with add to approve its restart. Without that approval, the saved change waits for a restart. An agent running in a terminal keeps its current tools until you start it again there.
lnk agent tool remove linklnk agent tool add linkCall Commands
Names use two underscores between command words, so lnk box list is box__list. Inputs follow the owning command's declared argument names and types. The server passes checked arguments directly to lnk, without a shell, and closes terminal input. Interactive terminal sessions are not exposed as ordinary calls.
Read Results
JSON commands return their normal JSON as text and structured content. Lists and scalar values are wrapped in a structured object under result. The manual and other text commands return text. A failed command returns a tool error, while an unavailable name or invalid input returns a protocol error before execution.
Approve Changes
Link agents allow declared reads and ask before each change through their existing sandbox approval path. An external MCP client must provide its own approval policy. Starting lnk mcp directly gives the client the command authority of the user running it. Security describes the boundary and its limits.