task_history
View recent task executions in the SFTP Orchestrator server, with optional filtering by specific server alias to monitor activity.
Instructions
Affiche les dernières tâches lancées. Peut être filtré par alias.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| alias | No | Filtre l'historique pour ne montrer que les tâches d'un alias spécifique. |
Implementation Reference
- server.js:494-507 (registration)Registers the 'task_history' MCP tool, including its title, description, input schema, and a thin handler function that delegates to the history module's getHistory method.server.registerTool( "task_history", { title: "Consulter l'historique des tâches", description: "Affiche les dernières tâches lancées. Peut être filtré par alias.", inputSchema: z.object({ alias: z.string().optional().describe("Filtre l'historique pour ne montrer que les tâches d'un alias spécifique.") }) }, async (params) => { const historyLogs = await history.getHistory(params); return { content: [{ type: "text", text: JSON.stringify(historyLogs, null, 2) }] }; } );
- server.js:499-501 (schema)Zod input schema defining optional 'alias' parameter for filtering task history.inputSchema: z.object({ alias: z.string().optional().describe("Filtre l'historique pour ne montrer que les tâches d'un alias spécifique.") })
- server.js:503-506 (handler)The registered handler function for 'task_history' tool, which calls history.getHistory and formats the response as JSON text content.async (params) => { const historyLogs = await history.getHistory(params); return { content: [{ type: "text", text: JSON.stringify(historyLogs, null, 2) }] }; }
- history.js:36-42 (helper)Core helper function that reads the task history from JSON file, optionally filters by server alias, and returns the list of historical tasks.async function getHistory(filters = {}) { let history = await readHistory(); if (filters.alias) { history = history.filter(log => log.alias === filters.alias); } return history; }