eyaltoledano/claude-task-master · error
MISSING_ARGUMENT
MISSING_ARGUMENT
Error message
tasksJsonPath is required
What it means
listTagsDirect requires tasksJsonPath because listing tags reads the tag map stored in tasks.json. When the argument is falsy it logs the failure, disables silent mode, and returns a MISSING_ARGUMENT error result before attempting any file access.
Source
Thrown at mcp-server/src/core/direct-functions/list-tags.js:43
// Destructure expected args
const { tasksJsonPath, showMetadata = false, projectRoot } = args;
const { session } = context;
// Enable silent mode to prevent console logs from interfering with JSON response
enableSilentMode();
// Create logger wrapper using the utility
const mcpLog = createLogWrapper(log);
try {
// Check if tasksJsonPath was provided
if (!tasksJsonPath) {
log.error('listTagsDirect called without tasksJsonPath');
disableSilentMode();
return {
success: false,
error: {
code: 'MISSING_ARGUMENT',
message: 'tasksJsonPath is required'
}
};
}
log.info('Listing all tags');
// Prepare options
const options = {
showMetadata
};
// Call the tags function
const result = await tags(
tasksJsonPath,
options,
{
session,View on GitHub (pinned to c0c98d367c)
Solutions
- Pass tasksJsonPath: <projectRoot>/.taskmaster/tasks/tasks.json in the call
- Resolve the path from projectRoot if the caller only knows the root
- Update client tool-call code so the argument is always forwarded
Example fix
// before
await mcp.call('list_tags', {});
// after
await mcp.call('list_tags', { tasksJsonPath: '/repo/.taskmaster/tasks/tasks.json' }); Defensive patterns
Strategy: validation
Validate before calling
import path from 'path';
function assertTasksJsonPath(args) {
if (typeof args.tasksJsonPath !== 'string' || args.tasksJsonPath === '') {
args.tasksJsonPath = path.join(args.projectRoot ?? '', '.taskmaster', 'tasks', 'tasks.json');
}
if (args.tasksJsonPath === '' || args.tasksJsonPath === '/.taskmaster/tasks/tasks.json') {
throw new Error('Cannot derive tasksJsonPath: provide projectRoot or tasksJsonPath');
}
return args;
} Type guard
function hasTasksJsonPath(args) {
return typeof args?.tasksJsonPath === 'string' && args.tasksJsonPath.length > 0;
} Try / catch
const res = await callTool('list_tags', { tasksJsonPath });
if (!res.success && res.error?.code === 'MISSING_ARGUMENT') {
console.error('list_tags requires tasksJsonPath; pass <root>/.taskmaster/tasks/tasks.json');
} Prevention
- Centralize a callTool wrapper that supplies tasksJsonPath for all tag/task tools
- Derive the path from projectRoot once at startup
- Add argument-presence assertions in client code before MCP dispatch
- Keep client tool-call code in sync with current MCP tool schemas
When it happens
Trigger: Calling the list_tags MCP tool without tasksJsonPath (or passing null/empty string).
Common situations: Client wrappers assuming tags are global rather than per-file; configs forwarding only projectRoot; API drift after tasksJsonPath became mandatory for tag operations.
Understand the failure class
Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.
Related errors
- projectRoot is required in args to resolve project paths
- MCP provider requires session object
- Schema is required for object generation
- MISSING_ARGUMENT
- INPUT_VALIDATION_ERROR
AI-assisted analysis of eyaltoledano/claude-task-master@c0c98d367c (2026-08-29).
Data as JSON: /api/errors/42e185cff42d5795.
Report an issue: GitHub.