← Tines 3BCONTENT HISTORY
WHAT CHANGED
Update to Tines 3B
Snapshot Nov 17, 2026 · 12:11 UTC · version 1.0.3
Collection source: downloaded plugin package.
First saved snapshot
No earlier snapshot is available to establish a change.
Save Tines 3B and check future changes in Following.
Up to 3 plugins free · no card required.
Compare saved observations
Download comparison JSONFull technical diff · 0 changed fields
Full snapshot data
{
"description": "Call tools on a remote MCP (Model Context Protocol) server over streamable HTTP. Use whenever a connector is an MCP server (e.g. the “MCP server” connector type), or the user asks to list or invoke an MCP server’s tools, prompts, or resources.",
"included_files": [],
"name": "mcp-client",
"skill_md_contents": "---\nname: mcp-client\ndescription: Call tools on a remote MCP (Model Context Protocol) server over streamable HTTP. Use whenever a connector is an MCP server (e.g. the “MCP server” connector type), or the user asks to list or invoke an MCP server’s tools, prompts, or resources.\nlicense: Apache-2.0\ncompatibility: Tines 3B\n---\n\n# Using a remote MCP server\n\nAn MCP server is a JSON-RPC 2.0 API behind a single HTTP endpoint. Talk to it with plain `fetch` from `execute` or a step, with the MCP connector attached — the platform injects authentication on matching requests, so never set Authorization headers yourself, and never print or store tokens.\n\nRead the body of every error response, as the helper below does. A `403` with `\"error\": \"connector_not_connected\"` means the user hasn’t connected their own account to a visitor-mode connector: show them the body’s `message`, and its `connect_url` as a link if present, then retry once they’ve connected. A `403` whose body is a JSON-RPC error saying a tool “is not allowed by this connector” means the connector only allows the tools its message lists: don’t retry or reconnect, use an allowed tool or tell the user that a connector manager can allow this one. Any other 401 or 403 means the user needs to reconnect the connector; tell them so rather than attempting an auth flow yourself.\n\n## Request basics\n\nEvery request is a POST to the server URL with `Content-Type: application/json` and `Accept: application/json, text/event-stream`. The response is either plain JSON or an SSE stream; for SSE, parse each `data:` line as JSON and take the message whose `id` matches your request. This helper handles both:\n\n```ts\nlet sessionId: string | undefined;\n\nasync function mcp(\n url: string,\n method: string,\n params?: Record<string, unknown>,\n id?: number\n) {\n const res = await fetch(url, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n Accept: \"application/json, text/event-stream\",\n ...(sessionId ? { \"Mcp-Session-Id\": sessionId } : {}),\n },\n body: JSON.stringify({\n jsonrpc: \"2.0\",\n method,\n ...(params ? { params } : {}),\n ...(id !== undefined ? { id } : {}),\n }),\n });\n sessionId = res.headers.get(\"Mcp-Session-Id\") ?? sessionId;\n const text = await res.text();\n if (!res.ok)\n throw new Error(`${method}: HTTP ${res.status}: ${text.slice(0, 500)}`);\n if (id === undefined) return; // notification, no response expected\n const messages = res.headers\n .get(\"Content-Type\")\n ?.includes(\"text/event-stream\")\n ? text\n .split(\"\\n\")\n .filter((line) => line.startsWith(\"data:\"))\n .map((line) => JSON.parse(line.slice(5)))\n : [JSON.parse(text)];\n const reply = messages.find((m) => m.id === id);\n if (!reply) throw new Error(`${method}: no response with id ${id}`);\n if (reply.error) throw new Error(`${method}: ${JSON.stringify(reply.error)}`);\n return reply.result;\n}\n```\n\n## Session lifecycle\n\n1. Send `initialize` with `protocolVersion: \"2025-06-18\"`, `capabilities: {}`, and your `clientInfo`. If the server rejects the protocol version, retry with the version it offers in the error.\n2. If the response carries an `Mcp-Session-Id` header, echo it on every subsequent request (the helper above does this).\n3. Send a `notifications/initialized` notification (no `id`).\n4. When finished, send a DELETE to the endpoint with the session header if the server supports it; ignore a 405.\n\n```ts\nawait mcp(\n SERVER_URL,\n \"initialize\",\n {\n protocolVersion: \"2025-06-18\",\n capabilities: {},\n clientInfo: { name: \"3B\", version: \"1.0\" },\n },\n 1\n);\nawait mcp(SERVER_URL, \"notifications/initialized\");\n```\n\n## Tools, prompts, and resources\n\n- `tools/list` returns tool names, descriptions, and JSON Schema inputs. Page with `cursor` if the result has `nextCursor`. Cache the list in a file instead of re-fetching every turn.\n- `tools/call` takes `{ name, arguments }`. The result has `content` blocks (usually `{ type: \"text\", text }`); check `isError` before trusting the output.\n- `prompts/list`, `prompts/get`, `resources/list`, and `resources/read` follow the same request shape.\n\n```ts\nconst { tools } = await mcp(SERVER_URL, \"tools/list\", {}, 2);\nconst result = await mcp(\n SERVER_URL,\n \"tools/call\",\n {\n name: \"some_tool\",\n arguments: { query: \"example\" },\n },\n 3\n);\nif (result.isError) throw new Error(result.content?.[0]?.text);\n```\n\nPrefer one short-lived session per task. If a long-running call streams progress notifications over SSE, ignore messages without your request `id` — only the matching response carries the result.\n"
}SHA-256 of public snapshot: dc53c9b298ae01c3128481efd4cb56f4bb769481c373083d3cbfe4638633e565