{"record":{"id":"c36e4b044f4a84a9","repo":"ComposioHQ/composio","slug":"invalid-tool-list-parameters-atleast-one-of-the-f","errorCode":null,"errorMessage":"Invalid tool list parameters, atleast one of the following parameters is required: tools, toolkits, search, authConfigIds","messagePattern":"Invalid tool list parameters, atleast one of the following parameters is required: tools, toolkits, search, authConfigIds","errorType":"validation","errorClass":"ValidationError","httpStatus":null,"severity":"error","filePath":"ts/packages/core/src/models/Tools.ts","lineNumber":524,"sourceCode":"      '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 (!(\n      'tools' in queryParams.data ||\n      'toolkits' in queryParams.data ||\n      'search' in queryParams.data ||\n      'authConfigIds' in queryParams.data\n    )) {\n      throw new ValidationError(\n        'Invalid tool list parameters, atleast one of the following parameters is required: tools, toolkits, search, authConfigIds'\n      );\n    }\n\n    // if tools are provided, set the limit to 9999 so that all tools are fetched\n    let limit = 'limit' in queryParams.data ? queryParams.data.limit : undefined;\n    if ('tools' in queryParams.data) {\n      limit = 9999;\n    }\n\n    const filters: ComposioToolListParams = {\n      ...('tools' in queryParams.data ? { tool_slugs: queryParams.data.tools?.join(',') } : {}),\n      ...('toolkits' in queryParams.data\n        ? { toolkit_slug: queryParams.data.toolkits?.join(',') }\n        : {}),\n      ...(limit ? { limit } : {}),\n      ...('tags' in queryParams.data ? { tags: queryParams.data.tags } : {}),\n      ...('scopes' in queryParams.data ? { scopes: queryParams.data.scopes } : {}),","sourceCodeStart":506,"sourceCodeEnd":542,"githubUrl":"https://github.com/ComposioHQ/composio/blob/64b1b85502b1beeb2379e6c9e8bf1104504fa637/ts/packages/core/src/models/Tools.ts#L506-L542","documentation":"ValidationError thrown when the tool-list query has none of the required selector fields: tools, toolkits, search, or authConfigIds. Listing tools without any filter would fetch everything, so the SDK requires at least one to be explicitly present.","triggerScenarios":"Calling composio.tools.get({}) or getRawComposioTools({ limit: 10 }) — limit alone (or any other non-selector field) does not satisfy the requirement.","commonSituations":"Building filters conditionally so all selector keys end up omitted, passing { limit } thinking it's enough, spreading an empty options object.","solutions":["Add at least one of tools, toolkits, search, or authConfigIds","If you want broad discovery, use search: '' or a wildcard toolkit list deliberately","Guard dynamic query builders to fall back to a default filter"],"exampleFix":"// before\ncomposio.tools.get({ limit: 10 })\n// after\ncomposio.tools.get({ toolkits: ['github'], limit: 10 })","handlingStrategy":"validation","validationCode":"const hasSelector = (q: object) => ['tools','toolkits','search','authConfigIds'].some(k => k in q);\nif (!hasSelector(query)) query.toolkits = ['github']; // sane default","typeGuard":"const hasSelector = (q: object): boolean => ['tools','toolkits','search','authConfigIds'].some(k => k in q);","tryCatchPattern":"try { await composio.tools.get(query); } catch (e) { if (e instanceof ValidationError && /atleast one/.test(e.message)) query.search = ''; else throw e; }","preventionTips":["When building queries conditionally, always set a fallback selector","Remember limit alone is not a valid selector"],"tags":["validation","tool-filter","typescript"],"backgroundTag":"missing-required-parameter","analyzedSha":"64b1b85502b1beeb2379e6c9e8bf1104504fa637","analyzedAt":"2026-08-28T15:39:33.623Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}