@elicitly/tools
v0.5.0
Published
Embeddable MCP elicitation toolkit — register elicit_confirm, elicit_form, and elicit_doctor on any McpServer, plus the elicitation-schema types and capability report/probe layer.
Maintainers
Readme
@elicitly/tools
Embeddable MCP elicitation toolkit: put the Elicitly tools —
elicit_confirm, elicit_form, elicit_doctor — on your own McpServer,
with the elicitation-schema types and the capability report/probe layer they
build on.
import { makeElicitAdapter, registerFormTools } from "@elicitly/tools"
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"
const server = new McpServer({ name: "my-server", version: "1.0.0" })
const { elicit, clientView } = makeElicitAdapter(server, {
getProtocolVersion: () => null,
})
registerFormTools(server, {
elicit,
clientView,
serverInfo: { name: "my-server", version: "1.0.0" },
})Your server now exposes the three elicitation tools with the same wire
contract as elicitly — dialogs
rendered by the connected host, results returned as typed JSON.
What's inside
registerFormTools(server, deps)— registerselicit_confirm,elicit_doctor,elicit_form(alphabetical wire order).makeElicitAdapter(server, opts)— bridges anMcpServerto the injectedelicitfunction the tools use (SDK-coupled edge, kept in one place).confirm/elicitForm/doctor— the tool handlers themselves, SDK-agnostic and unit-tested; use them directly for custom registration.core/(re-exported) — the SDK-free layer: elicitation-schema types (ElicitSchema,scalarSchema) and the passive capability report + probe classification (buildPassiveReport,classifyProbe).
