MCPcopy Create free account
hub / github.com/cloudflare/mcp / listNonCodemodeTools

Function listNonCodemodeTools

tests/non-codemode-worker.test.ts:47–60  ·  view source on GitHub ↗

POST a non-codemode tools/list to the real worker.

(token: string)

Source from the content-addressed store, hash-verified

45 { name: 'script_name', in: 'path', required: true }
46 ],
47 responses: {}
48 }
49 }
50}
51
52/** POST a non-codemode tools/list to the real worker. */
53async function listNonCodemodeTools(token: string) {
54 const base = mcpToolListRequest(token)
55 const req = new Request(`${MCP_URL}?codemode=false`, base)
56 const result = (await parseMcpResult(await exports.default.fetch(req))) as unknown as {
57 result?: {
58 tools?: Array<{
59 name: string
60 description?: string
61 inputSchema: { properties?: Record<string, unknown>; required?: string[] }
62 }>
63 }

Callers 1

Calls 3

mcpToolListRequestFunction · 0.90
parseMcpResultFunction · 0.90
fetchMethod · 0.65

Tested by

no test coverage detected