Skip to main content
Glama
stagsz

Unconventional-thinking MCP server

by stagsz

search_thoughts

Filter unconventional thoughts by metadata like rebellion status or assumption challenges to find relevant idea IDs for further exploration.

Instructions

Search for thought IDs by metadata. Returns only matching IDs and metadata, not full content. Enables efficient filtering.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
branchIdNoOptional branch ID to filter thoughts
isRebellionNoFilter by rebellion status
challengesAssumptionNoFilter by assumption-challenging status
limitNoMaximum number of results to return (default: 10)

Implementation Reference

  • Handler function for the 'search_thoughts' tool. Filters thoughts by branchId, isRebellion, challengesAssumption, and limit. Returns JSON with metadata and resource URIs only, keeping full content separate.
    case "search_thoughts": {
      const { branchId, isRebellion, challengesAssumption, limit = 10 } = request.params.arguments as any || {};
      const thoughts = loadThoughts();
    
      // Filter at the server level - don't send unfiltered data to Claude
      const filtered = Object.values(thoughts)
        .filter(t => {
          if (branchId && t.branchId !== branchId) return false;
          if (isRebellion !== undefined && t.isRebellion !== isRebellion) return false;
          if (challengesAssumption !== undefined && t.challengesAssumption !== challengesAssumption) return false;
          return true;
        })
        .sort((a, b) => b.timestamp - a.timestamp)
        .slice(0, limit);
    
      // Return only metadata - IDs and resource URIs, not full content
      return {
        content: [{
          type: "text",
          text: JSON.stringify({
            count: filtered.length,
            thoughts: filtered.map(t => ({
              id: t.id,
              resourceUri: `thought://${t.id}`,
              isRebellion: t.isRebellion,
              challengesAssumption: t.challengesAssumption,
              branchId: t.branchId || "main",
              timestamp: t.timestamp
            }))
          }, null, 2)
        }]
      };
    }
  • src/index.ts:101-125 (registration)
    Tool registration in ListToolsRequestSchema handler, defining name, description, and input schema for 'search_thoughts'.
    {
      name: "search_thoughts",
      description: "Search for thought IDs by metadata. Returns only matching IDs and metadata, not full content. Enables efficient filtering.",
      inputSchema: {
        type: "object",
        properties: {
          branchId: {
            type: "string",
            description: "Optional branch ID to filter thoughts"
          },
          isRebellion: {
            type: "boolean",
            description: "Filter by rebellion status"
          },
          challengesAssumption: {
            type: "boolean",
            description: "Filter by assumption-challenging status"
          },
          limit: {
            type: "number",
            description: "Maximum number of results to return (default: 10)"
          }
        }
      }
    }
  • Input schema definition for the 'search_thoughts' tool, specifying parameters for filtering thoughts.
    inputSchema: {
      type: "object",
      properties: {
        branchId: {
          type: "string",
          description: "Optional branch ID to filter thoughts"
        },
        isRebellion: {
          type: "boolean",
          description: "Filter by rebellion status"
        },
        challengesAssumption: {
          type: "boolean",
          description: "Filter by assumption-challenging status"
        },
        limit: {
          type: "number",
          description: "Maximum number of results to return (default: 10)"
        }
      }

Tool Definition Quality

Score is being calculated. Check back soon.

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/stagsz/Unconventional-thinking'

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