ComposioHQ/composio · error · Error
Invalid arguments for local tool ${resolution.finalSlug}: ${
Error message
Invalid arguments for local tool ${resolution.finalSlug}: ${parsed.error.issues.map(issue => `${issue.path.join('.') || '<root>'}: ${issue.message}`).join('; ')} What it means
The local tool was found and platform-supported, but the arguments object failed the tool's Zod inputParams validation. The message enumerates each issue as a path plus message, joining multiple issues with ';'. This mirrors schema validation failures on remote tools but happens client-side before spawning any process.
Source
Thrown at ts/packages/cli-local-tools/src/registry.ts:240
version: 'local',
};
};
export const executeLocalToolBySlug = async (
slug: string,
args: Record<string, unknown>
): Promise<Record<string, unknown> | null> => {
const resolution = resolveLocalTool(slug, { includeUnsupported: true });
if (!resolution) return null;
if (!resolution.supported) {
throw new Error(
`Local tool ${resolution.finalSlug} is not supported on ${resolution.currentPlatform}. Supported platforms: ${formatSupportedPlatforms(resolution.tool.platforms)}.`
);
}
const parsed = resolution.tool.inputParams.safeParse(args);
if (!parsed.success) {
throw new Error(
`Invalid arguments for local tool ${resolution.finalSlug}: ${parsed.error.issues
.map(issue => `${issue.path.join('.') || '<root>'}: ${issue.message}`)
.join('; ')}`
);
}
return executeLocalTool(resolution.tool.execution, parsed.data as Record<string, unknown>, {
toolkit: resolution.toolkit,
tool: resolution.tool,
finalSlug: resolution.finalSlug,
platform: resolution.currentPlatform,
});
};
View on GitHub (pinned to 64b1b85502)
Solutions
- Read the issue paths in the message and fix the corresponding arguments
- Inspect the tool's inputParams schema via the registry before calling
- Validate args with the same Zod schema in your own code before invoking
- If args come from an LLM, re-prompt with the schema on failure
Example fix
// before
await executeLocalToolBySlug('imessage__send', { recipient: '', });
// after
await executeLocalToolBySlug('imessage__send', { recipient: '+15551234567', message: 'hi' }); Defensive patterns
Strategy: validation
Validate before calling
const resolution = resolveLocalTool(slug); const check = resolution ? resolution.tool.inputParams.safeParse(args) : null; if (!check?.success) console.error(check?.error.issues);
Type guard
const argsValid = (slug: string, args: unknown): args is Record<string, unknown> => resolveLocalTool(slug)?.tool.inputParams.safeParse(args).success === true;
Try / catch
try { ... } catch (e) { if (e instanceof Error && e.message.startsWith('Invalid arguments for local tool')) showZodIssues(e); } Prevention
- Validate with the tool's inputParams schema before execution
- Type tool call arguments in agent harnesses
When it happens
Trigger: Calling executeLocalToolBySlug with missing required fields, wrong types (e.g. string where number expected), or unknown/invalid enum values; passing a null recipient list to an iMessage send tool.
Common situations: Passing untyped JSON from an LLM tool call straight into a local tool; renaming a parameter and forgetting call sites; empty strings where the schema requires minLength.
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
- Failed to parse create connected account link options
- Invalid parameters passed to create mcp config
- Failed to validate update params
- Invalid params passed for Get Instance Params
- Invalid proxy execute parameters
AI-assisted analysis of ComposioHQ/composio@64b1b85502 (2026-08-28).
Data as JSON: /api/errors/51b3fd69bfa358e4.
Report an issue: GitHub.