Skip to main content
Glama

task_history

View recent tasks executed by the MCP SFTP Orchestrator server. Filter tasks by specific server alias to monitor operations and track execution history.

Instructions

Affiche les dernières tâches lancées. Peut être filtré par alias.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aliasNoFiltre l'historique pour ne montrer que les tâches d'un alias spécifique.

Implementation Reference

  • server.js:494-507 (registration)
    Registration of the 'task_history' tool. Includes input schema (optional 'alias' filter), description, and handler that delegates to history.getHistory() and returns JSON response.
    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) }] }; } );
  • Core execution logic for the task_history tool: reads task history from JSON file, optionally filters by server alias, and returns the filtered list of past tasks.
    async function getHistory(filters = {}) { let history = await readHistory(); if (filters.alias) { history = history.filter(log => log.alias === filters.alias); } return history; }
  • Zod input schema for task_history tool: accepts optional 'alias' string to filter history by server.
    inputSchema: z.object({ alias: z.string().optional().describe("Filtre l'historique pour ne montrer que les tâches d'un alias spécifique.") })
  • Helper function to read the task history from the JSON persistence file (config.dataDir/history.json). Used by getHistory.
    async function readHistory() { try { await fs.access(HISTORY_FILE_PATH); const data = await fs.readFile(HISTORY_FILE_PATH, 'utf-8'); return JSON.parse(data); } catch (error) { return []; } }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/fkom13/mcp-sftp-orchestrator'

If you have feedback or need assistance with the MCP directory API, please join our Discord server