Skip to main content
Glama

adjust_memento_confidence

Manually adjust relationship confidence scores in MCP Memento to correct, verify, or override automatic decay based on user knowledge.

Instructions

Manually adjust confidence of a relationship.

Use for:

  • Correcting confidence scores when you know a memory is valid/invalid

  • Setting custom confidence based on verification

  • Overriding automatic decay for specific cases

Examples:

  • adjust_memento_confidence(relationship_id="rel-123", new_confidence=0.9, reason="Verified in production")

  • adjust_memento_confidence(relationship_id="rel-456", new_confidence=0.1, reason="Obsolete after library update")

Confidence ranges:

  • 0.9-1.0: High confidence (recently validated)

  • 0.7-0.89: Good confidence (regularly used)

  • 0.5-0.69: Moderate confidence (somewhat outdated)

  • 0.3-0.49: Low confidence (likely outdated)

  • 0.0-0.29: Very low confidence (probably obsolete)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
relationship_idYesID of the relationship to adjust
new_confidenceYesNew confidence value (0.0-1.0)
reasonNoReason for the adjustment

Implementation Reference

  • Handler function for the adjust_memento_confidence tool.
    async def handle_adjust_memento_confidence(
        memory_db: SQLiteMemoryDatabase, arguments: Dict[str, Any]
    ) -> CallToolResult:
        """Handle adjust_confidence tool call.
    
        Args:
            memory_db: Database instance for memory operations
            arguments: Tool arguments from MCP call containing:
                - relationship_id: ID of the relationship to adjust
                - new_confidence: New confidence value (0.0-1.0)
                - reason: Reason for the adjustment
    
        Returns:
            CallToolResult with confirmation or error message
        """
        relationship_id = arguments["relationship_id"]
        new_confidence = float(arguments["new_confidence"])
        reason = arguments.get("reason", "Manual adjustment")
    
        await memory_db.adjust_confidence(relationship_id, new_confidence, reason)
    
        return CallToolResult(
            content=[
                TextContent(
                    type="text",
                    text=f"Adjusted confidence for relationship {relationship_id} to {new_confidence:.2f}",
                )
            ]
        )
  • Registration of the adjust_memento_confidence tool in the MCP tool registry.
        handle_adjust_memento_confidence,
        handle_apply_memento_confidence_decay,
        handle_boost_memento_confidence,
        handle_get_low_confidence_mementos,
        handle_set_memento_decay_factor,
    )
    from .guide_tools import (
        handle_memento_onboarding,
    )
    from .memory_tools import (
        handle_delete_memento,
        handle_get_memento,
        handle_store_memento,
        handle_update_memento,
    )
    from .relationship_tools import (
        handle_create_memento_relationship,
        handle_get_related_mementos,
    )
    from .search_tools import (
        handle_contextual_memento_search,
        handle_recall_mementos,
        handle_search_mementos,
    )
    
    # Type alias for tool handlers
    ToolHandler = Callable[[Any, Dict[str, Any]], Awaitable[CallToolResult]]
    
    # Registry mapping tool names to handlers
    TOOL_HANDLERS: Dict[str, ToolHandler] = {
        "store_memento": handle_store_memento,
        "get_memento": handle_get_memento,
        "update_memento": handle_update_memento,
        "delete_memento": handle_delete_memento,
        "search_mementos": handle_search_mementos,
        "recall_mementos": handle_recall_mementos,
        "contextual_memento_search": handle_contextual_memento_search,
        "create_memento_relationship": handle_create_memento_relationship,
        "get_related_mementos": handle_get_related_mementos,
        "get_memento_statistics": handle_get_memento_statistics,
        "memento_onboarding": handle_memento_onboarding,
        "get_recent_memento_activity": handle_get_recent_memento_activity,
        "search_memento_relationships_by_context": handle_search_memento_relationships_by_context,
        # Confidence system tools
        "adjust_memento_confidence": handle_adjust_memento_confidence,
  • Tool definition/schema for adjust_memento_confidence.
    name="adjust_memento_confidence",

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

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