GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Custom plugin tools receive undefined args when AI omits optional parameters (same root cause as #9020) · Issue #20019 · anomalyco/opencode Closed as not planned Closed as not planned Copy link DescriptionDescriptionCustom tools defined via Steps to Reproduce
import { tool } from "@opencode-ai/plugin"; import { randomUUID } from "crypto"; export default tool({ description: "Generate one or more UUID v4s.", args: { count: tool.schema.number().min(1).max(10).default(1).describe("Number of UUIDs to generate."), }, async execute(args) { return Array.from({ length: args.count }, () => randomUUID()).join("\n"); }, });
Expected Behavior
Actual Behavior
ContextThe fix in #11203 patched this for MCP tools in - arguments: args as Record<string, unknown>, + arguments: (args || {}) as Record<string, unknown>, But custom plugin tools go through a different code path (likely WorkaroundHandle async execute(args) { const count = args.count ?? 1; return Array.from({ length: count }, () => randomUUID()).join("\n"); }, Environment
Activity
MetadataMetadataAssigneesLabelsNo labels TypeProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |