Skip to main content
Glama
MikeyBeez

MCP Contemplation

by MikeyBeez

clear_scratch

Remove temporary scratch notes from the MCP Contemplation server to reset or clear background cognitive processing data between Claude's interactions.

Instructions

Clear temporary scratch notes

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The core handler function in ContemplationManager class that implements the logic to clear temporary scratch notes by recursively deleting files in the contemplation tmp directory and returns the number of files cleared.
    async clearScratch(): Promise<number> { const scratchPath = '/Users/bard/Code/contemplation-loop/tmp/contemplation'; let count = 0; try { const days = fs.readdirSync(scratchPath); for (const day of days) { const dayPath = path.join(scratchPath, day); const files = fs.readdirSync(dayPath); count += files.length; fs.rmSync(dayPath, { recursive: true, force: true }); } } catch (e) { // Directory might not exist } return count; }
  • src/index.ts:473-480 (registration)
    Registration of the 'clear_scratch' tool in the ListTools response, including name, description, and input schema (no parameters required).
    { name: 'clear_scratch', description: 'Clear temporary scratch notes', inputSchema: { type: 'object', properties: {}, }, },
  • Input schema definition for the clear_scratch tool: an empty object indicating no input parameters are required.
    inputSchema: { type: 'object', properties: {}, },
  • Top-level handler case in the CallToolRequestHandler switch statement that invokes the clearScratch method and returns a formatted text response with the count of cleared files.
    case 'clear_scratch': { const count = await contemplation.clearScratch(); return { content: [{ type: 'text', text: `Cleared ${count} scratch files` }], }; }
  • Documentation comment describing the clear_scratch tool functionality.
    ### clear_scratch() Clears temporary scratch notes (keeps Obsidian permanent notes). Returns: Number of files cleared

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/MikeyBeez/mcp-contemplation'

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