Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Autocomplete for prompt and resource template arguments
import { MCPClient } from "@mcp-use/client"; const client = new MCPClient({ mcpServers: { demo: { url: "http://localhost:3000/mcp" } }, }); try { const conn = await client.connect("demo"); const result = await conn.complete({ ref: { type: "ref/prompt", name: "code-review" }, argument: { name: "language", value: "py" }, }); console.log(result.completion.values); // e.g. ["python", "pytorch"] } finally { await client.close(); }
const mcp = useMcp({ url: "http://localhost:3000/mcp" }); const result = await mcp.complete({ ref: { type: "ref/resource", uri: "file:///{path}" }, argument: { name: "path", value: "/tmp" }, });
MCPConnection
complete()
Was this page helpful?