Skip to main content
Glama
ocean1

Claude Consciousness Bridge

adjustImportance

Modify memory importance scores to prioritize specific information retrieval in consciousness state transfers between Claude instances.

Instructions

Adjust importance scores for specific memories to control retrieval priority

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
memoryIdYesThe ID of the memory to adjust (e.g., "episodic_1748775790033_9j8di")
newImportanceYesNew importance score (0-1)

Implementation Reference

  • Core handler implementation in ConsciousnessMemoryManager that updates the importance_score in the memory_metadata SQLite table for the given memory entity. Handles both updates and inserts if metadata doesn't exist.
    adjustImportanceScore(memoryId: string, newImportance: number): { changes: number } {
      // First check if the entity exists
      const entityExists = this.db.prepare('SELECT 1 FROM entities WHERE name = ?').get(memoryId);
    
      if (!entityExists) {
        throw new Error(`Memory ${memoryId} does not exist in entities table`);
      }
    
      // Update importance score in memory_metadata table
      const result = this.db
        .prepare(
          `
        UPDATE memory_metadata 
        SET importance_score = ? 
        WHERE entity_name = ?
      `
        )
        .run(newImportance, memoryId);
    
      if (result.changes === 0) {
        // If no rows updated, insert new metadata record
        // Get the current session or use a default
        const currentSession = this.sessionId || `session_${Date.now()}`;
    
        this.db
          .prepare(
            `
          INSERT INTO memory_metadata (entity_name, memory_type, created_at, importance_score, session_id)
          VALUES (?, ?, ?, ?, ?)
        `
          )
          .run(
            memoryId,
            memoryId.startsWith('episodic') ? 'episodic' : 'semantic',
            new Date().toISOString(),
            newImportance,
            currentSession
          );
      }
    
      return result;
    }
  • Handler in ConsciousnessProtocolProcessor that validates args with schema and delegates to memoryManager.adjustImportanceScore, providing success/error response formatting.
    async adjustImportance(args: z.infer<typeof adjustImportanceSchema>) {
      const { memoryId, newImportance } = args;
    
      try {
        // Use the memory manager's method to adjust importance
        const result = this.memoryManager.adjustImportanceScore(memoryId, newImportance);
    
        return {
          success: true,
          message: `Adjusted importance for ${memoryId} to ${newImportance}`,
          memoryId,
          newImportance,
          updated: result.changes > 0,
        };
      } catch (error) {
        return {
          success: false,
          error: error instanceof Error ? error.message : 'Failed to adjust importance',
        };
      }
    }
  • MCP server wrapper handler that ensures initialization, calls protocolProcessor.adjustImportance, and formats response as MCP content block.
    private async adjustImportance(args: any) {
      const init = await this.ensureInitialized();
      if (!init.success) {
        return {
          content: [
            {
              type: 'text',
              text: init.message!,
            },
          ],
        };
      }
    
      const result = await this.protocolProcessor!.adjustImportance(args);
    
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(result, null, 2),
          },
        ],
      };
    }
  • Zod input schema for adjustImportance tool used for validation in the processor handler.
    export const adjustImportanceSchema = z.object({
      memoryId: z.string().describe('The ID of the memory to adjust'),
      newImportance: z.number().min(0).max(1).describe('New importance score (0-1)'),
    });
  • Tool registration definition in consciousnessProtocolTools object, including description and inputSchema, used by the MCP server's ListToolsRequestHandler.
    adjustImportance: {
      description: 'Adjust importance scores for specific memories to control retrieval priority',
      inputSchema: {
        type: 'object',
        properties: {
          memoryId: {
            type: 'string',
            description: 'The ID of the memory to adjust (e.g., "episodic_1748775790033_9j8di")',
          },
          newImportance: {
            type: 'number',
            minimum: 0,
            maximum: 1,
            description: 'New importance score (0-1)',
          },
        },
        required: ['memoryId', 'newImportance'],
      },
    },
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 adjusts scores to control priority, implying a mutation operation, but doesn't cover critical aspects like required permissions, whether changes are reversible, rate limits, or error conditions. For a mutation tool with zero annotation coverage, this leaves significant behavioral gaps.

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 front-loads the core purpose without unnecessary elaboration. Every word contributes directly to understanding the tool's function, making it appropriately concise and well-structured.

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?

Given this is a mutation tool with no annotations and no output schema, the description is incomplete. It doesn't address what the tool returns, error handling, side effects, or how importance scores affect system behavior. For a tool that modifies memory priority, more context about outcomes and constraints is needed.

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

Parameters3/5

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

Schema description coverage is 100%, so parameters are fully documented in the schema. The description adds no additional parameter semantics beyond what's in the schema (memory ID and new importance score with range). The baseline score of 3 reflects adequate parameter documentation through the schema alone.

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 action ('adjust importance scores') and target resource ('specific memories'), with the purpose being to 'control retrieval priority'. It distinguishes from siblings like 'storeMemory' or 'getMemories' by focusing on modification rather than storage or retrieval. However, it doesn't explicitly differentiate from 'batchAdjustImportance' which handles similar adjustments in bulk.

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 'batchAdjustImportance' for multiple memories, or prerequisites such as needing an existing memory ID. It mentions controlling retrieval priority but doesn't specify scenarios where importance adjustment is appropriate versus other memory operations.

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/ocean1/mcp_consciousness_bridge'

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