{"record":{"id":"9f9a4944ed1a513a","repo":"ruvnet/ruflo","slug":"tool-this-name-requires-a-handler","errorCode":null,"errorMessage":"Tool ${this.name} requires a handler","messagePattern":"Tool (.+?) requires a handler","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"v3/@claude-flow/plugins/src/sdk/index.ts","lineNumber":375,"sourceCode":"    this.properties[name] = {\n      type: 'array',\n      description,\n      items: itemsSchema,\n    };\n    if (options?.required) {\n      this.required.push(name);\n    }\n    return this;\n  }\n\n  withHandler(handler: MCPToolDefinition['handler']): this {\n    this.handler = handler;\n    return this;\n  }\n\n  build(): MCPToolDefinition {\n    if (!this.handler) {\n      throw new Error(`Tool ${this.name} requires a handler`);\n    }\n\n    return {\n      name: this.name,\n      description: this.description,\n      inputSchema: {\n        type: 'object',\n        properties: this.properties,\n        required: this.required.length > 0 ? this.required : undefined,\n      },\n      handler: this.handler,\n    };\n  }\n}\n\n// ============================================================================\n// Hook Builder\n// ============================================================================","sourceCodeStart":357,"sourceCodeEnd":393,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/v3/@claude-flow/plugins/src/sdk/index.ts#L357-L393","documentation":"MCP tool builder's build() was called before withHandler() supplied the execution handler. An MCPToolDefinition is incomplete without a handler — the tool would be advertised to clients but could not execute — so the builder refuses to emit the definition. The tool at fault is identified by this.name.","triggerScenarios":"A tool built with the plugin SDK is executed or registered without a handler function.","commonSituations":"Tool builder chain missing .handler(fn) before registration.","solutions":["Attach a handler with .handler(async (args) => ...) before registering the tool.","Validate the tool definition at build time to catch missing handlers early."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fa13ee4ad60ac2090b1480656eb233521790d640","analyzedAt":"2026-08-18T21:34:22.708Z","contentChangedAt":"2026-08-18T21:34:22.708Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}