Skip to content

First Tool Call ​

Make a read-only call before asking an agent to change your workspace. Keep Nexus running with a workspace open, and connect your client first. Your client normally handles protocol negotiation; these messages show the exchange when you inspect it or build your own integration.

The examples use JSON-RPC 2.0 over stdio. They are formatted for reading; send each message as one line.

1. Discover the server ​

For the 2026-07-28 protocol, put the version in params._meta on every request. The _meta block does not belong at the JSON-RPC root.

json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "server/discover",
  "params": {
    "_meta": {
      "io.modelcontextprotocol/protocolVersion": "2026-07-28",
      "io.modelcontextprotocol/clientInfo": {
        "name": "example-cli",
        "version": "1.0.0"
      },
      "io.modelcontextprotocol/clientCapabilities": {}
    }
  }
}

The discovery response includes the supported protocol versions and server identity:

json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "resultType": "complete",
    "supportedVersions": ["2026-07-28", "2025-06-18"],
    "capabilities": { "tools": {} },
    "ttlMs": 3600000,
    "cacheScope": "public",
    "_meta": {
      "io.modelcontextprotocol/serverInfo": {
        "name": "nexus-mcp",
        "version": "1.0.0"
      }
    }
  }
}

Read version and cache values from your response. Discovery is answered by the local MCP process; it does not prove the desktop app is reachable.

2. List the available tools ​

json
{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "tools/list",
  "params": {
    "_meta": {
      "io.modelcontextprotocol/protocolVersion": "2026-07-28"
    }
  }
}

Expected result: a tools array. Each entry includes its name, description, and inputSchema. Nexus tool descriptions begin with [Local NEXUS app]. The mounted tools depend on your running app; discovery does not enumerate namespaces.

3. Read the current workspace ​

If your tool list includes workspace_current, inspect your calling workspace:

json
{
  "jsonrpc": "2.0",
  "id": 3,
  "method": "tools/call",
  "params": {
    "name": "workspace_current",
    "arguments": {},
    "_meta": {
      "io.modelcontextprotocol/protocolVersion": "2026-07-28"
    }
  }
}

Expected result: MCP text content describing your local workspace and isError: false. If that tool is absent, choose a read tool advertised by your own tools/list response. Read that tool's schema before supplying arguments.

A successful JSON-RPC exchange can still contain isError: true. Inspect the tool result before reporting success or attempting a write.

Older clients ​

Clients using 2025-06-18 can use the existing initialize handshake:

json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "initialize",
  "params": {
    "protocolVersion": "2025-06-18",
    "capabilities": {},
    "clientInfo": {
      "name": "example-cli",
      "version": "1.0.0"
    }
  }
}

After the initialize response, send the notifications/initialized notification. Legacy requests omit modern params._meta; their normal tool results do not contain resultType. Both versions reach the same mounted tools. See MCP protocol for complete response and error shapes.

If the call fails ​

SymptomNext step
Discovery works but listing tools failsOpen Nexus and the intended workspace, then reconnect the client.
A modern result has no resultTypeConfirm the protocol version is inside params._meta.
-32022Select a version listed in error.data.supported.
-32602Check metadata and the selected tool's current inputSchema.
isError: trueRead the tool's error content and fix the reported scope, capability, or input problem.

Next ​

Try Draw a diagram from an agent for a workflow that changes a shared canvas, or choose another path in Where to go next.

Built with purpose. chainabit.com