Skip to main content
Glama

boost_memento_confidence

Increase confidence scores for verified information in the MCP Memento memory system when knowledge is successfully applied or validated.

Instructions

Boost confidence when a memory is successfully used.

Use for:

  • Reinforcing valid knowledge

  • Manual confidence increase for verified information

  • After successfully applying a solution

  • When verifying old information is still valid

Usage patterns:

  • After successfully applying a solution → boost its confidence

  • When verifying old information is still valid → boost confidence

  • When multiple team members confirm a pattern → boost confidence

Boost mechanics:

  • Base boost: +0.10 per access (capped at 1.0)

  • Additional boost for validation: +0.10 to +0.20

  • Maximum confidence: 1.0 (cannot exceed)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
memory_idYesID of the memory to boost confidence for. When provided, boosts confidence on all relationships of that memory. Either memory_id or relationship_id must be specified.
relationship_idNoID of a specific relationship to boost confidence for. Use this to target a single relationship instead of all relationships of a memory. Either memory_id or relationship_id must be specified.
boost_amountNoAmount to boost confidence (default: 0.10)
reasonNoReason for the boost

Implementation Reference

  • The handler logic for 'boost_memento_confidence', which adjusts the confidence of a memory or its associated relationships in the database.
    async def handle_boost_memento_confidence(
        memory_db: SQLiteMemoryDatabase, arguments: Dict[str, Any]
    ) -> CallToolResult:
        """Handle boost_confidence tool call.
    
        Boost confidence when a memory or relationship is used successfully.
    
        Args:
            memory_db: Database instance for memory operations
            arguments: Tool arguments from MCP call containing:
                - memory_id: ID of memory to boost (optional, requires relationship_id if not provided)
                - relationship_id: ID of relationship to boost (optional, requires memory_id if not provided)
                - boost_amount: Amount to boost confidence (default: 0.1)
                - reason: Reason for the boost
    
        Returns:
            CallToolResult with confirmation or error message
        """
        memory_id = arguments.get("memory_id")
        relationship_id = arguments.get("relationship_id")
        boost_amount = float(arguments.get("boost_amount", 0.1))
        reason = arguments.get("reason", "Successful usage")
    
        if not memory_id and not relationship_id:
            return CallToolResult(
                content=[
                    TextContent(
                        type="text",
                        text="Either memory_id or relationship_id must be provided",
                    )
                ],
                isError=True,
            )
    
        if boost_amount < 0.0 or boost_amount > 0.5:
            return CallToolResult(
                content=[
                    TextContent(
                        type="text",
                        text="Boost amount must be between 0.0 and 0.5",
                    )
                ],
                isError=True,
            )
    
        if memory_id:
            # Boost confidence for all relationships of this memory
            try:
                # Get memory to check current confidence
                memory = await memory_db.get_memory_by_id(memory_id)
                if not memory:
                    return CallToolResult(
                        content=[
                            TextContent(
                                type="text",
                                text=f"Memory not found: {memory_id}",
                            )
                        ],
                        isError=True,
                    )
    
                # Calculate new confidence
                new_confidence = min(1.0, memory.confidence + boost_amount)
    
                # Update memory confidence
                # Note: This requires adding update_memory_confidence method to database
                # For now, we'll update through relationships
                # Get relationships for this memory
                relationships = await memory_db.get_relationships_for_memory(memory_id)
                for rel in relationships:
                    new_rel_confidence = min(1.0, rel.properties.confidence + boost_amount)
                    await memory_db.adjust_confidence(
                        rel.id,
                        new_rel_confidence,
                        f"Boosted via memory {memory_id}: {reason}",
                    )
    
                if not relationships:
                    message = (
                        f"Memory '{memory_id}' has no relationships — confidence boost requires "
                        f"at least one relationship. "
                        f"Create one first with `create_memento_relationship`."
                    )
                else:
                    message = f"Boosted confidence for {len(relationships)} relationships of memory {memory_id} by {boost_amount:.2f}"
    
            except Exception as e:
                logger.error(f"Failed to boost confidence for memory {memory_id}: {e}")
                return CallToolResult(
                    content=[
                        TextContent(
                            type="text",
                            text=f"Failed to boost confidence: {str(e)}",
                        )
                    ],
                    isError=True,
                )
    
        else:  # relationship_id is provided
            try:
                # Get current relationship confidence
                relationships = await memory_db.get_relationships_for_memory(
                    relationship_id
                )
                if not relationships:
                    return CallToolResult(
                        content=[
                            TextContent(
                                type="text",
                                text=f"Relationship not found: {relationship_id}",
                            )
                        ],
                        isError=True,
                    )
    
                # Find the specific relationship
                rel = next((r for r in relationships if r.id == relationship_id), None)
                if not rel:
                    return CallToolResult(
  • The MCP tool definition (schema and description) for 'boost_memento_confidence'.
            Tool(
                name="boost_memento_confidence",
                description="""Boost confidence when a memory is successfully used.
    
    Use for:
    - Reinforcing valid knowledge
    - Manual confidence increase for verified information
    - After successfully applying a solution
    - When verifying old information is still valid
    
    Usage patterns:
    - After successfully applying a solution → boost its confidence
    - When verifying old information is still valid → boost confidence
    - When multiple team members confirm a pattern → boost confidence
    
    Boost mechanics:
    - Base boost: +0.10 per access (capped at 1.0)
    - Additional boost for validation: +0.10 to +0.20
    - Maximum confidence: 1.0 (cannot exceed)""",
                inputSchema={
                    "type": "object",
                    "properties": {
                        "memory_id": {
                            "type": "string",
                            "description": (
                                "ID of the memory to boost confidence for. "
                                "When provided, boosts confidence on all relationships of that memory. "
                                "Either memory_id or relationship_id must be specified."
  • Registration of the 'boost_memento_confidence' handler within the tools registry.
    "boost_memento_confidence": handle_boost_memento_confidence,
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description carries full burden. Discloses mechanics thoroughly: base boost (+0.10), cap (1.0), validation bonus (+0.10-0.20), and maximum bound. Missing explicit statement on idempotency or error behavior when memory_id is invalid, but covers primary behavioral traits well.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Well-organized with clear headers ('Use for', 'Usage patterns', 'Boost mechanics'). Front-loaded with the core purpose. Length is appropriate for the complexity, though the mechanics section slightly duplicates schema details (default values) while adding context.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Comprehensive coverage of usage scenarios and mathematical mechanics given no output schema exists. Explains the mutual exclusivity logic between memory_id and relationship_id implicitly through usage patterns. Does not clarify return values or error states, but sufficient for invocation decisions.

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

Parameters4/5

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

Schema coverage is 100% (all 4 params fully documented). Description adds value by specifying default boost amounts (+0.10) and validation ranges in the 'Boost mechanics' section, providing semantic context for the 'boost_amount' parameter beyond the schema's generic number description.

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?

States specific action ('Boost confidence') and resource ('memory'), and implies narrow scope through 'when successfully used'. Does not explicitly differentiate from sibling 'adjust_memento_confidence' (which implies bidirectional modification), leaving slight ambiguity about why choose this specific tool.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit 'Use for' and 'Usage patterns' sections listing specific contexts (reinforcing valid knowledge, after applying solutions, team confirmation). Lacks explicit 'when-not-to-use' guidance or naming of alternatives like 'adjust_memento_confidence', preventing a 5.

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/x-hannibal/mcp-memento'

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