Skip to main content
Glama

search_nodes

Quickly locate specific nodes in Workflowy by entering a search query. Simplify task management and organization by finding relevant content instantly.

Instructions

Search nodes in Workflowy

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query to find matching nodes

Implementation Reference

  • The async handler function implementing the core logic of the 'search_nodes' tool. It invokes workflowyClient.search with the provided query and credentials, returning the search results as JSON or an error message.
    handler: async ({ query, username, password }: { query: string, username?: string, password?: string }, client: typeof workflowyClient) => { try { const items = await workflowyClient.search(query, username, password); return { content: [{ type: "text", text: JSON.stringify(items, null, 2) }] }; } catch (error: any) { return { content: [{ type: "text", text: `Error searching nodes: ${error.message}` }] }; } }
  • Zod-based input schema defining the 'query' parameter for the search_nodes tool.
    inputSchema: { query: z.string().describe("Search query to find matching nodes") },
  • The registerTools function that iterates over the toolRegistry (which includes search_nodes from workflowyTools) and registers each tool with the MCP server via server.addTool, mapping the handler, schema, etc.
    export function registerTools(server: FastMCP): void { Object.entries(toolRegistry).forEach(([name, tool]) => { server.addTool({ name, description: tool.description, parameters: z.object(tool.inputSchema), annotations: tool.annotations, execute: tool.handler }); }); }
  • The complete definition of the search_nodes tool object within the exported workflowyTools, which is spread into the central toolRegistry.
    search_nodes: { description: "Search nodes in Workflowy", inputSchema: { query: z.string().describe("Search query to find matching nodes") }, annotations: { title: "Search nodes in Workflowy", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false }, handler: async ({ query, username, password }: { query: string, username?: string, password?: string }, client: typeof workflowyClient) => { try { const items = await workflowyClient.search(query, username, password); return { content: [{ type: "text", text: JSON.stringify(items, null, 2) }] }; } catch (error: any) { return { content: [{ type: "text", text: `Error searching nodes: ${error.message}` }] }; } } },

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/danield137/mcp-workflowy'

If you have feedback or need assistance with the MCP directory API, please join our Discord server