Skip to main content
Glama
MikeyBeez

MCP Contemplation

by MikeyBeez

send_thought

Submit thoughts for background cognitive processing to maintain continuity, recognize patterns, and develop insights between conversations.

Instructions

Send a thought for background processing

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
thought_typeYesType of thought to process
contentYesThe thought content to process
priorityNoPriority 1-10 (default 5)

Implementation Reference

  • MCP tool handler for 'send_thought' that extracts parameters from the request and delegates execution to ContemplationManager.sendThought, returning the generated thought ID.
    case 'send_thought': {
      const { thought_type, content, priority } = args as {
        thought_type: string;
        content: string;
        priority?: number;
      };
      
      const thoughtId = await contemplation.sendThought(thought_type, content, priority);
      return {
        content: [{ type: 'text', text: `Thought sent for processing. ID: ${thoughtId}` }],
      };
    }
  • Input schema definition for the 'send_thought' tool, specifying parameters, types, enums, and requirements for validation.
    inputSchema: {
      type: 'object',
      properties: {
        thought_type: {
          type: 'string',
          enum: ['pattern', 'connection', 'question', 'general'],
          description: 'Type of thought to process'
        },
        content: {
          type: 'string',
          description: 'The thought content to process'
        },
        priority: {
          type: 'number',
          description: 'Priority 1-10 (default 5)',
          minimum: 1,
          maximum: 10
        }
      },
      required: ['thought_type', 'content'],
  • src/index.ts:384-407 (registration)
    Registration of the 'send_thought' tool in the ListTools response, including name, description, and full input schema.
    {
      name: 'send_thought',
      description: 'Send a thought for background processing',
      inputSchema: {
        type: 'object',
        properties: {
          thought_type: {
            type: 'string',
            enum: ['pattern', 'connection', 'question', 'general'],
            description: 'Type of thought to process'
          },
          content: {
            type: 'string',
            description: 'The thought content to process'
          },
          priority: {
            type: 'number',
            description: 'Priority 1-10 (default 5)',
            minimum: 1,
            maximum: 10
          }
        },
        required: ['thought_type', 'content'],
      },
  • Core implementation of sending a thought: generates ID, constructs message, writes to subprocess stdin for background processing, returns ID.
    async sendThought(thoughtType: string, content: string, priority: number = 5): Promise<string> {
      if (!this.subprocess) {
        throw new Error('Contemplation loop not running. Call start_contemplation first.');
      }
    
      const thoughtId = `thought_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`;
      const message = {
        action: 'add_thought',
        thought_type: thoughtType,
        content: content,
        priority: priority,
        thought_id: thoughtId
      };
    
      this.subprocess.stdin?.write(JSON.stringify(message) + '\n');
      return thoughtId;
    }

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