{"record":{"id":"cbc1739d47f7693d","repo":"deepseek-ai/deepseek-harness","slug":"harness-definetool-path-must-be-a-parametersche","errorCode":null,"errorMessage":"harness.defineTool ${path} must be a ParameterSchemaSpec object","messagePattern":"harness\\.defineTool (.+?) must be a ParameterSchemaSpec object","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/extensions/cordis-host-runner/src/guard.ts","lineNumber":218,"sourceCode":"/** Reject sandbox schema keys that the unified DSL would otherwise ignore. */\nfunction assertSchemaKeys(value: Record<string, unknown>, path: string, allowed: readonly string[]): void {\n  assertSchemaContainerKeys(value, path)\n  for (const key of Object.keys(value)) {\n    if (!allowed.includes(key)) throw new Error(`harness.defineTool ${path}.${key} is not supported by the unified schema DSL`)\n  }\n}\n\n/**\n * Normalize a sandbox-provided `parameters` value into a fresh host-realm\n * ParameterSchemaSpec. A raw JSON-Schema object wrapper retains its open root\n * default, while the direct DSL is already an implicit open property map.\n */\nfunction normalizeParameterSchemaSpec(value: unknown, path = 'parameters'): {\n  spec: Record<string, unknown>\n  rootAnnotations?: Record<string, unknown>\n} {\n  if (!isPlainRecord(value)) {\n    throw new Error(`harness.defineTool ${path} must be a ParameterSchemaSpec object`)\n  }\n  if (value.type === 'object') {\n    assertSchemaKeys(value, path, ['type', 'properties', 'required', 'additionalProperties', ...ANNOTATION_KEYS])\n    if (!isPlainRecord(value.properties)) {\n      throw new Error(`harness.defineTool ${path}.properties must be an object of schemas`)\n    }\n    if (Object.hasOwn(value, 'additionalProperties') && value.additionalProperties !== true) {\n      throw new Error(`harness.defineTool ${path}.additionalProperties must be true or omitted because the implicit parameter root is open`)\n    }\n    if (Object.hasOwn(value, 'required') && value.required === undefined) {\n      throw new Error(`harness.defineTool ${path}.required must be an array of declared property names`)\n    }\n    const required = normalizeRequiredNames(value.required, value.properties, `${path}.required`)\n    const rootAnnotations: Record<string, unknown> = {}\n    copyAnnotations(value, rootAnnotations, path)\n    return {\n      spec: normalizePropertyMap(value.properties, path, required, true),\n      ...(Object.keys(rootAnnotations).length === 0 ? {} : { rootAnnotations }),","sourceCodeStart":200,"sourceCodeEnd":236,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/extensions/cordis-host-runner/src/guard.ts#L200-L236","documentation":"Error \"harness.defineTool ${path} must be a ParameterSchemaSpec object\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/extensions/cordis-host-runner/src/guard.ts:218 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b150a551b8d465e31e418e1b2eaf5e79bbb7d28e","analyzedAt":"2026-08-24T18:12:29.105Z","schemaVersion":2},"datasetVersion":"2026-08-24T22:17:12.610Z"}