Skip to main content
Glama
xxczaki

Local History MCP Server

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();
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. It states the tool lists files but doesn't describe what information is returned (file names, paths, timestamps), whether there's pagination, sorting, or filtering options, or any performance considerations. The description is minimal and lacks important operational context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that gets straight to the point with zero wasted words. It's appropriately sized for a simple listing tool and front-loads the essential information about what the tool does.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with no annotations and no output schema, the description is insufficiently complete. It doesn't explain what format the listing returns, what information about each file is included, or how the results are structured. Given the sibling tools suggest this is part of a history system, more context about the listing's scope and content would be helpful.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters with 100% schema description coverage, so the schema already fully documents the parameter situation. The description appropriately doesn't discuss parameters since none exist, maintaining focus on the tool's purpose. Baseline for 0 parameters is 4.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'List' and the resource 'files that have local history entries in VS Code', making the purpose immediately understandable. It doesn't explicitly differentiate from sibling tools like 'get_history_stats' or 'search_history_content', but the specific focus on files with history entries provides reasonable distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'get_history_stats' (for statistics) or 'search_history_content' (for content-based searching). It simply states what the tool does without indicating appropriate contexts or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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