DSH Plugins Marketplace

DSH Plugins

Plugins

/

Tools & Capabilities

/

dsh-gemini-tool-schema

d

dsh-gemini-tool-schema

Manifest valid

Normalizes every tool schema before it reaches the model, rewriting it into the strict OpenAPI 3.0 subset that Gemini function declarations accept — a type on every node, items on every array, no empt

hasBundlePatch

dsh-gemini-tool-schema

Normalize the tool schemas sent to the model into the strict OpenAPI 3.0 subset that Gemini's function declarations accept. A TypeScript plugin for DeepSeek Harness.

npm version license ci

English | 中文

The problem

Strict providers accept only a subset of JSON Schema. Google Gemini's functionDeclarations[].parameters rejects the whole request (HTTP 400) when:

Real errorOffending schemaSource
schema didn't specify the schema type field{ anyOf: [{type:'string',…}, {type:'null'}] } — no typePlaywright MCP browser_emulate_media.colorScheme (z.string().nullable())
properties[v_types].items: missing field{ type: 'array' } — no itemsLingshu MCP lingshu_cg / lingshu_stg (19 params)
properties[permission].enum[3]: cannot be emptyenum: [..., '']DSH built-in task_board_update.permission

All three are legal elsewhere, which is why the failure only shows up on a Gemini-flavoured route.

Why a Harness hook

An MCP proxy only reaches the servers it wraps. Built-in tools and tools registered by other plugins never cross an MCP transport, so normalizing at Harness assembly time is the only fix that covers every tool at once.

Install

git clone https://github.com/ChenXu233/dsh-gemini-tool-schema.git
cd dsh-gemini-tool-schema && npm install && npm run build

Append to <DSH home>/profiles/<profile>/cordis.patch.yml:

- insert:
    - id: gemini-tool-schema
      name: '/absolute/path/to/dsh-gemini-tool-schema/dist/index.js'
      config:
        mode: list
        apis: ['gemini', 'google', 'vertex']

Or npm install dsh-gemini-tool-schema and mount it by package name.

Configuration

FieldDefaultMeaning
modelistall every request · list matching APIs only · off disabled
apis['gemini','google','vertex']API patterns, compiled as regular expressions
unknownApiapplyWhen the route cannot be read: apply or skip
itemsFallback{type:'string'}Element schema for arrays that omit items
nullabletrueEmit nullable: true for null unions
dryRunfalseReport and lint, but send the original schemas
logFile / logLevelnone / infoOne diagnostic line per assembly
dumpDir / dumpSchemasnone / trueDump the model-facing tool set for offline auditing

Patterns match against provider/model (e.g. gemini-lumiya/gemini-4-argon) and accept substring, regex, and /pattern/flags forms; an entry that does not compile degrades to a case-insensitive substring match. '*' matches everything, or set mode: all.

Rules

Every node gets a type; every array gets items; enum entries are never empty (and const cannot reintroduce one); $ref/$defs are inlined cycle-safely; unsupported keywords are stripped and the remaining scalars pass an allow-list; required is narrowed to real properties.

Development

npm test        # Node ≥22.6 runs the TS tests directly — 36 tests
npm run build   # tsc → dist/

License

MIT © 2026 ChenXu233

Comments

Loading…

Similar plugins

dsh-more-models-thinking-level

Per-model reasoning effort declarations for GPT, Gemini and OpenAI-compatible providers in DeepSeek Harness

Terminal & ClientsModels & ProvidersManifest valid

★ 0

dsh plugin --profile web add dsh-more-models-thinking-level

Prunes the tool schema to a whitelist and injects a structural preamble on a session's first turn only, then passes every later turn through untouched.

Development & InfrastructureManifest valid

★ 0

dsh plugin --profile web add dsh-minimal-anchor

by MrWeiCodes

Fine-grained permission gateway: per-category tool-call review (outside-workspace directories, commands, file read/write, subagents, repeated actions) with global & per-project allow/deny exceptions,

Security & AuditManifest valid

★ 11

↓ 828/wk

MIT

JavaScript

Oct 11, 2026

dsh plugin --profile web add @mrweicodes/dsh-permgate

by bainianlaoyao

Codex-shaped coding tools and agent presets for GPT models on DeepSeek Harness: exec_command, write_stdin, apply_patch and view_image, plus OpenAI Chat Completions and Responses API routes, bridged to

Workflow & AutomationModels & ProvidersManifest valid

★ 0

JavaScript

Sep 13, 2026

dsh plugin --profile web add dsh-codex-mode

by alchemistwu

Neutralize tool calls with invalid JSON arguments on the wire so one malformed model generation cannot brick a session against strict OpenAI-compatible servers.

Tools & CapabilitiesSessions & MessagesManifest valid

★ 0

↓ 68/wk

MIT

JavaScript

Aug 31, 2026

dsh plugin --profile web add dsh-tool-call-guard

by yanglaofish

Routes model requests, web fetches/searches and spawned tools through the Windows system proxy or a custom address — idempotent kernel (reads never rebuild the dispatcher), header one-click toggle, pe

Tools & CapabilitiesManifest valid

★ 4

↓ 322/wk

MIT

JavaScript

Sep 23, 2026

dsh plugin --profile web add @yanglaofish/dsh-proxy-pro