{"record":{"id":"621a74610668bc0f","repo":"ComposioHQ/composio","slug":"invalid-tool-list-parameters","errorCode":null,"errorMessage":"Invalid tool list parameters","messagePattern":"Invalid tool list parameters","errorType":"validation","errorClass":"ValidationError","httpStatus":null,"severity":"error","filePath":"ts/packages/core/src/models/Tools.ts","lineNumber":500,"sourceCode":"   * const authSpecificTools = await composio.tools.getRawComposioTools({\n   *   authConfigIds: ['auth_config_123']\n   * });\n   * ```\n   */\n  async getRawComposioTools(\n    query: ToolListParams,\n    options?: SchemaModifierOptions,\n    requestOptions?: ComposioRequestOptions\n  ): Promise<ToolList> {\n    if ('tools' in query && 'toolkits' in query) {\n      throw new ValidationError(\n        'Invalid tool list parameters. You should not use tools and toolkits filter together.'\n      );\n    }\n\n    const queryParams = ToolListParamsSchema.safeParse(query);\n    if (queryParams.error) {\n      throw new ValidationError('Invalid tool list parameters', {\n        cause: queryParams.error,\n      });\n    }\n\n    const shouldAutoApplyImportant =\n      'toolkits' in queryParams.data &&\n      !('tools' in queryParams.data) &&\n      !('tags' in queryParams.data) &&\n      !('search' in queryParams.data) &&\n      // if the user provides a limit, do not apply the important flag\n      !('limit' in queryParams.data) &&\n      queryParams.data.important !== false;\n\n    const effectiveImportant =\n      'important' in queryParams.data ? queryParams.data.important : shouldAutoApplyImportant;\n\n    // check if the query params contains atleast one of the following: tools, toolkits, search, authConfigIds\n    if (!(","sourceCodeStart":482,"sourceCodeEnd":518,"githubUrl":"https://github.com/ComposioHQ/composio/blob/64b1b85502b1beeb2379e6c9e8bf1104504fa637/ts/packages/core/src/models/Tools.ts#L482-L518","documentation":"ValidationError (with the Zod error as cause) thrown when the query passed to getRawComposioTools fails ToolListParamsSchema.safeParse. This means structurally invalid values: wrong types for tools/toolkits/search/limit, unknown shapes, etc.","triggerScenarios":"Passing a non-string in the tools array, a string where an array is expected, limit as a non-number, or a malformed query object to composio.tools.get(...).","commonSituations":"Passing a single slug string instead of an array, untyped JSON input from user config or an LLM, trailing garbage keys after schema changes between SDK versions.","solutions":["Inspect e.cause (the Zod error) for the exact failing field","Pass tools/toolkits as string arrays and limit as a number","If consuming external JSON, pre-validate with ToolListParamsSchema or your own Zod schema"],"exampleFix":"// before\ncomposio.tools.get({ tools: 'github_star_repo' })\n// after\ncomposio.tools.get({ tools: ['github_star_repo'] })","handlingStrategy":"validation","validationCode":"import { ToolListParamsSchema } from '@composio/core';\nconst parsed = ToolListParamsSchema.safeParse(query);\nif (!parsed.success) console.error(parsed.error.issues);","typeGuard":"const isToolListParams = (q: unknown) => ToolListParamsSchema.safeParse(q).success;","tryCatchPattern":"try { await composio.tools.get(query); } catch (e) { if (e instanceof ValidationError && e.cause) console.error(e.cause.issues); throw e; }","preventionTips":["Always pass arrays for tools/toolkits and numbers for limit","Validate untyped/LLM-generated input with the Zod schema first"],"tags":["validation","zod","typescript","tool-filter"],"backgroundTag":"schema-validation-failed","analyzedSha":"64b1b85502b1beeb2379e6c9e8bf1104504fa637","analyzedAt":"2026-08-28T15:39:33.623Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}