{"record":{"id":"cdafb5667ec86b11","repo":"deepseek-ai/deepseek-harness","slug":"tool-name-must-declare-output-schema-rende","errorCode":null,"errorMessage":"tool \"${name}\" must declare output { schema, render, presentationMeta? }","messagePattern":"tool \"(.+?)\" must declare output (.+?)","errorType":"exception","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"packages/core/tools/src/index.ts","lineNumber":1043,"sourceCode":"      const known = Object.keys(SDK_RENDERERS).map(name => JSON.stringify(name)).join(', ')\n      throw new Error(`dsh-tools: no SDK renderer registered for runtime language ${JSON.stringify(runtime.language)} (known: ${known})`)\n    }\n    return runtime\n  }\n\n  /**\n   * Register globally or in the calling agent scope. Scoped tools shadow\n   * globals; duplicates within one layer and the reserved `run_code` name fail.\n   * @param definition - tool schema, execution, and optional finalization/presentation callbacks.\n   * @returns the exact disposer that unregisters the tool.\n   */\n  register(definition: ToolDefinition): () => void {\n    const name = definition.name\n    const output = (definition as Partial<ToolDefinition>).output\n    if (output === undefined || typeof output !== 'object'\n      || typeof output.render !== 'function'\n      || (output.presentationMeta !== undefined && typeof output.presentationMeta !== 'function')) {\n      throw new TypeError(`tool \"${name}\" must declare output { schema, render, presentationMeta? }`)\n    }\n    assertSupportedJsonSchema(output.schema)\n    const timeoutMs = definition.timeoutMs\n    if (timeoutMs !== undefined\n      && (!Number.isFinite(timeoutMs) || timeoutMs <= 0)) {\n      throw new TypeError(`tool \"${name}\" timeoutMs must be a positive finite number`)\n    }\n    // Reserved unconditionally: any agent may select a code mode for itself,\n    // so a name free to take under the deployment default would become a\n    // collision the moment a preset mounted.\n    if (name === RUN_CODE_NAME) {\n      throw new Error(`tool name \"${RUN_CODE_NAME}\" is reserved for the Code Mode presentation transport and cannot be registered or shadowed`)\n    }\n    return this.layers.effect(\n      this.ctx,\n      layer => layer.tools.insert(name, definition),\n      { label: 'tools.register()' },\n    )","sourceCodeStart":1025,"sourceCodeEnd":1061,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/core/tools/src/index.ts#L1025-L1061","documentation":"Error \"tool \"${name}\" must declare output { schema, render, presentationMeta? }\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/core/tools/src/index.ts:1043 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"}