Skip to main content
Glama
xxczaki
by xxczaki

list_history_files

Retrieve files with saved history entries in VS Code to enable version recovery and track changes over time.

Instructions

List all files that have local history entries in VS Code

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for 'list_history_files' tool. It fetches all file histories from the VSCodeHistoryParser, constructs a list with file paths, entry counts, and last modified times, and returns a formatted text response.
    private async listHistoryFiles() { const histories = this.historyParser.getAllFileHistories(); const fileList = histories.map((history) => ({ filePath: history.originalFilePath, entryCount: history.entries.length, lastModified: new Date(history.entries[0]?.timestamp || 0).toISOString(), })); return { content: [ { type: 'text', text: `Found ${fileList.length} files with local history:\n\n` + fileList .map( (file) => `📄 ${file.filePath}\n` + ` └── ${file.entryCount} history entries\n` + ` └── Last saved: ${file.lastModified}`, ) .join('\n\n'), }, ], }; }
  • Input schema for the 'list_history_files' tool, which takes no parameters (empty object).
    inputSchema: { type: 'object', properties: {}, additionalProperties: false, },
  • src/index.ts:52-61 (registration)
    Registration of the 'list_history_files' tool in the ListToolsRequestSchema handler response, including name, description, and input schema.
    { name: 'list_history_files', description: 'List all files that have local history entries in VS Code', inputSchema: { type: 'object', properties: {}, additionalProperties: false, }, },
  • src/index.ts:167-168 (registration)
    Dispatch case in the CallToolRequestSchema handler that routes calls to 'list_history_files' to the listHistoryFiles method.
    case 'list_history_files': return await this.listHistoryFiles();

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/xxczaki/local-history-mcp'

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