From 83425532fbfd431b9636b54bd4d652a010f54ed3 Mon Sep 17 00:00:00 2001 From: 245769051-tech <245769051-tech@users.noreply.github.com> Date: Mon, 17 Aug 2026 00:06:53 +0800 Subject: [PATCH] fix: declare find_dsh_plugins parameters as standard JSON Schema (ctx.tools.register projects parameters verbatim; the shorthand DSL lacks top-level type object, causing INVALID_REQUEST on every model call) --- lib/index.js | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/lib/index.js b/lib/index.js index f3dc872..7567b5d 100644 --- a/lib/index.js +++ b/lib/index.js @@ -97,19 +97,23 @@ export function apply(ctx) { name: 'find_dsh_plugins', description: TOOL_DESCRIPTION, parameters: { - query: { - type: 'string', - required: true, - description: 'User\'s need in natural language (Chinese or English), e.g. "给纯文本模型读图片的能力", "手机上查看会话进度", "Claude Code 风格的终端界面".', - }, - limit: { - type: 'number', - description: 'Max results to return (default 5, max 10).', - }, - installable_only: { - type: 'boolean', - description: 'Return only plugins that declare a dsh.bundle manifest and can be installed with dsh plugin add. Default false.', + type: 'object', + additionalProperties: false, + properties: { + query: { + type: 'string', + description: 'User\'s need in natural language (Chinese or English), e.g. "给纯文本模型读图片的能力", "手机上查看会话进度", "Claude Code 风格的终端界面".', + }, + limit: { + type: 'number', + description: 'Max results to return (default 5, max 10).', + }, + installable_only: { + type: 'boolean', + description: 'Return only plugins that declare a dsh.bundle manifest and can be installed with dsh plugin add. Default false.', + }, }, + required: ['query'], }, output: { schema: {