Skip to main content
Glama
xxczaki
by xxczaki

list_history_files

Retrieve a list of files with local history entries in VS Code for recovery or context awareness using the Local History MCP Server.

Instructions

List all files that have local history entries in VS Code

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that retrieves all file histories using VSCodeHistoryParser, constructs a list with file paths, entry counts, and last modified timestamps, and returns a formatted text response listing the files with history.
    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'), }, ], }; }
  • Tool schema definition: name 'list_history_files', description, and input schema as empty object (no parameters required).
    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)
    Registration in the CallToolRequestSchema handler switch statement, which routes calls to the 'list_history_files' tool to the listHistoryFiles() method.
    case 'list_history_files': return await this.listHistoryFiles();

Other Tools

Related Tools

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