{"record":{"id":"afd57ec8c3df1e6a","repo":"vercel/ai","slug":"host-tool-toolname-must-use-an-object-json-sche","errorCode":null,"errorMessage":"Host tool ${toolName} must use an object JSON Schema for MCP.","messagePattern":"Host tool (.+?) must use an object JSON Schema for MCP\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/harness-acp/src/v1/bridge/host-tool-mcp-server.ts","lineNumber":145,"sourceCode":"    }),\n  };\n}\n\nfunction requireObjectSchema({\n  toolName,\n  schema,\n}: {\n  toolName: string;\n  schema: unknown;\n}): Tool['inputSchema'] {\n  if (\n    schema == null ||\n    typeof schema !== 'object' ||\n    Array.isArray(schema) ||\n    (Reflect.get(schema, 'type') !== undefined &&\n      Reflect.get(schema, 'type') !== 'object')\n  ) {\n    throw new Error(\n      `Host tool ${toolName} must use an object JSON Schema for MCP.`,\n    );\n  }\n  return schema as Tool['inputSchema'];\n}\n\nfunction toCallToolResult({\n  result,\n}: {\n  result: HostToolMCPInvocationResult;\n}): CallToolResult {\n  return {\n    content: [\n      {\n        type: 'text',\n        text: stringifyOutput({ output: result.output }),\n      },\n    ],","sourceCodeStart":127,"sourceCodeEnd":163,"githubUrl":"https://github.com/vercel/ai/blob/69428b1f8b037e4d118fb4853428d5c4e620493c/packages/harness-acp/src/v1/bridge/host-tool-mcp-server.ts#L127-L163","documentation":"Error \"Host tool ${toolName} must use an object JSON Schema for MCP.\" thrown in vercel/ai.","triggerScenarios":"Thrown at packages/harness-acp/src/v1/bridge/host-tool-mcp-server.ts:145 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":"69428b1f8b037e4d118fb4853428d5c4e620493c","analyzedAt":"2026-08-30T12:32:21.016Z","schemaVersion":2},"datasetVersion":"2026-08-30T13:17:10.514Z"}