ComposioHQ/composio · error · ValidationError
Invalid params passed for Get Instance Params
Error message
Invalid params passed for Get Instance Params
What it means
The options argument to the MCP instance generate endpoint failed validation against MCPGetInstanceParamsSchema. Even when omitted, options defaults to { manuallyManageConnections: false } and is validated, so an explicitly invalid object fails immediately.
Source
Thrown at ts/packages/core/src/models/MCP.ts:444
* @param mcpConfigId {string} config id of the MCPConfig for which you want to create a server for
* @param options {object} additional options
* @param options.isChatAuth {boolean} Authenticate the users via chat when they use the MCP Server
*/
async generate(
userId: string,
mcpConfigId: string,
options?: MCPGetInstanceParams,
requestOptions?: ComposioRequestOptions
): Promise<MCPServerInstance> {
const server = await withCancellation(
() => this.client.mcp.retrieve(mcpConfigId, requestOptions),
requestOptions?.signal
);
const params = MCPGetInstanceParamsSchema.safeParse(
options ?? { manuallyManageConnections: false }
);
if (params.error) {
throw new ValidationError('Invalid params passed for Get Instance Params', {
cause: params.error,
});
}
const urlBody = {
mcp_server_id: mcpConfigId,
user_ids: [userId],
managed_auth_by_composio: options?.manuallyManageConnections ? false : true,
};
const urlResponse = await withCancellation(
() => this.client.mcp.generate.url(urlBody, requestOptions),
requestOptions?.signal
);
const userIdsURL = urlResponse.user_ids_url[0];
const serverInstance = MCPServerInstanceSchema.safeParse({
id: server.id,
name: server.name,View on GitHub (pinned to 64b1b85502)
Solutions
- Check error.cause for the exact key that failed
- Pass only supported keys (e.g. manuallyManageConnections: boolean) or omit options entirely
- Ensure booleans are actual booleans, not 'true'/'false' strings
Example fix
// before
const inst = await mcp.server.instance(id, { manuallyManageConnections: 'true' });
// after
const inst = await mcp.server.instance(id, { manuallyManageConnections: true }); Defensive patterns
Strategy: validation
Validate before calling
const opts = { manuallyManageConnections: Boolean(raw.manuallyManageConnections ?? false) };
await mcp.server.instance(id, opts); // or omit options Type guard
const isInstanceParams = (o: unknown): boolean => MCPGetInstanceParamsSchema.safeParse(o).success;
Try / catch
try { await mcp.server.instance(id, opts); } catch (e) { if (e instanceof ValidationError && /Get Instance Params/.test(e.message)) { return mcp.server.instance(id); } throw e; } Prevention
- Omit options unless you need connection control
- Coerce booleans from env/config sources
- Pass only documented keys
When it happens
Trigger: Calling the generate/instance method (e.g. mcp.server.instance(...) or text/result helpers) with an options object containing unknown keys or wrong types, such as manuallyManageConnections: 'yes'.
Common situations: Passing connection flags as strings from env/config files; adding options fields that only exist in newer/older SDK versions; spreading unrelated settings into options.
Understand the failure class
Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.
Related errors
- Invalid parameters passed to create mcp config
- Failed to validate update params
- Invalid arguments for local tool ${resolution.finalSlug}: ${
- Failed to parse create connected account link options
- Failed to validate list options
AI-assisted analysis of ComposioHQ/composio@64b1b85502 (2026-08-28).
Data as JSON: /api/errors/ef6d924ba70a18dd.
Report an issue: GitHub.