4
builtin tools
TOOLS
Backend tools run in sveda-server. Frontend tools run in the browser. Host MCP is an HTTP server you pass when minting the embed token.
4
builtin tools
register
frontend API
HTTP
host MCP
Tooling usually means a custom MCP client, a browser callback bus, and a workspace indexer that never share a catalog. Each server is headers and a session you maintain. The agent should list tools from three layers without a new control plane.
Hand-rolled transports, auth, and tool lists. Host MCP on Sveda is an HTTP URL plus token on the embed handshake — http or https, Bearer outbound.
Confirm dialogs and in-page actions never join the model loop. SvedaToolRegistry.register puts them on the same turn as backend tools.
Without an index, “read the file” is a prompt hack. Builtin search_code and read_code_file run when a workspace index is attached to the runtime.
Backend tools execute in sveda-server. Frontend tools execute in the host via the registry on SvedaClient. Host MCP is listed when you pass host_mcp_url and host_mcp_token together while minting the embed token.
Four agent tools. They appear in the catalog when the runtime has the matching capability — index, spawn, deferred discovery.
Register handlers before send. A tool.call with target frontend runs in the browser, then the stream continues.
Not a second JS MCP client. URL and token are stored per visitor_id. Outbound calls use Bearer. Schemes are http and https.
CATALOG
If you send host_mcp_url without host_mcp_token, or the reverse, the mint rejects. Both are required together. The runtime lists tools over HTTP and executes them during the turn with Authorization: Bearer on the outbound request.
search_agent_tools discovers deferred MCP tools. spawn_tasks fans parallel work on the same SSE pipe via tool.progress. search_code ranks the workspace index; read_code_file pages a file the runtime already indexed. None of this is a Vue plugin.
Rules live in the tools docs. The host MCP and code agent solutions show the two common attach paths.
POST /sveda/embed/token
x-sveda-host-key: …
{
"visitor_id": "visitor-1",
"host_mcp_url": "https://host.example/mcp",
"host_mcp_token": "…"
} Embed token
Host MCP credentials ride on the same mint as the visitor token.
Stream protocol
tool.call, tool.result, and tool.progress are SSE events.
JS client
SvedaToolRegistry.register is how frontend tools join the turn.
Tools docs
Builtins, frontend registry, and host MCP attachment rules.
Host MCP
HTTP tools from the embed-token handshake.
Code agent
search_code and read_code_file on a workspace index.
Builtins in sveda-server. Frontend via SvedaToolRegistry. Host MCP only when URL and token arrive together.