Skip to main content
Glama

clear_history

Remove captured terminal command logs to manage storage and maintain privacy in the Terminal Reader MCP environment.

Instructions

Clear the captured terminal history log file.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • index.js:253-278 (registration)
    Registers the 'clear_history' MCP tool with title, description, empty input schema, and inline handler function.
    server.registerTool( 'clear_history', { title: 'Clear Terminal History', description: 'Clear the captured terminal history log file.', inputSchema: {}, }, async () => { try { writeFileSync(LOG_FILE, ''); return { content: [{ type: 'text', text: 'Terminal history cleared.', }], }; } catch (error) { return { content: [{ type: 'text', text: `Failed to clear history: ${error.message}`, }], }; } } );
  • The handler function for the 'clear_history' tool. It clears the terminal history log file by overwriting it with an empty string and returns a success or error message in MCP format.
    async () => { try { writeFileSync(LOG_FILE, ''); return { content: [{ type: 'text', text: 'Terminal history cleared.', }], }; } catch (error) { return { content: [{ type: 'text', text: `Failed to clear history: ${error.message}`, }], }; } }
  • Schema definition for the 'clear_history' tool, including title, description, and empty input schema (no parameters required).
    { title: 'Clear Terminal History', description: 'Clear the captured terminal history log file.', inputSchema: {},

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/chrisvin-jabamani/terminal-reader-mcp'

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