Skip to main content
Glama

resolve_question

Mark Fatebook predictions as resolved with YES, NO, or AMBIGUOUS outcomes to track forecast accuracy and update prediction status.

Instructions

Resolve a Fatebook question with YES/NO/AMBIGUOUS resolution

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
questionIdYes
resolutionYes
questionTypeYes
apiKeyNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The resolve_question tool handler. Decorated with @mcp.tool(), it validates inputs, calls the Fatebook API to resolve the question, and returns True on success.
    @mcp.tool()
    async def resolve_question(
        questionId: str, resolution: str, questionType: str, apiKey: str = ""
    ) -> bool:
        """Resolve a Fatebook question with YES/NO/AMBIGUOUS resolution"""
    
        api_key = apiKey or os.getenv("FATEBOOK_API_KEY")
        if not api_key:
            raise ValueError(
                "API key is required (provide as parameter or set FATEBOOK_API_KEY environment variable)"
            )
    
        # Validate resolution parameter
        valid_resolutions = ["YES", "NO", "AMBIGUOUS"]
        if resolution not in valid_resolutions:
            raise ValueError(f"resolution must be one of {valid_resolutions}")
    
        data = {
            "questionId": questionId,
            "resolution": resolution,
            "questionType": questionType,
            "apiKey": api_key,
        }
    
        try:
            async with httpx.AsyncClient() as client:
                response = await client.post("https://fatebook.io/api/v0/resolveQuestion", json=data)
                response.raise_for_status()
                return True
    
        except httpx.HTTPError:
            raise
        except Exception:
            raise
  • main.py:153-190 (handler)
    Alternative implementation of resolve_question tool handler in main.py with additional Context logging.
    @mcp.tool()
    async def resolve_question(
        ctx: Context, questionId: str, resolution: str, questionType: str, apiKey: str = ""
    ) -> bool:
        """Resolve a Fatebook question with YES/NO/AMBIGUOUS resolution"""
    
        api_key = apiKey or os.getenv("FATEBOOK_API_KEY")
        if not api_key:
            await ctx.error("API key is required but not provided")
            raise ValueError(
                "API key is required (provide as parameter or set FATEBOOK_API_KEY environment variable)"
            )
    
        # Validate resolution parameter
        valid_resolutions = ["YES", "NO", "AMBIGUOUS"]
        if resolution not in valid_resolutions:
            await ctx.error(f"Invalid resolution parameter: {resolution}")
            raise ValueError(f"resolution must be one of {valid_resolutions}")
    
        data = {
            "questionId": questionId,
            "resolution": resolution,
            "questionType": questionType,
            "apiKey": api_key,
        }
    
        try:
            async with httpx.AsyncClient() as client:
                response = await client.post("https://fatebook.io/api/v0/resolveQuestion", json=data)
                response.raise_for_status()
                return True
    
        except httpx.HTTPError as e:
            await ctx.error(f"HTTP error occurred: {e}")
            raise
        except Exception as e:
            await ctx.error(f"Unexpected error occurred: {e}")
            raise
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool resolves questions but doesn't cover critical aspects like required permissions, whether the resolution is reversible, rate limits, or what happens upon invocation. This leaves significant gaps in understanding the tool's behavior.

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 any wasted words. It directly communicates what the tool does, making it highly concise and well-structured for quick understanding.

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

Completeness3/5

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

Given the tool's complexity (a mutation with 4 parameters) and the presence of an output schema (which reduces the need to describe return values), the description is minimally adequate. However, with no annotations and low schema coverage, it lacks details on behavior and parameters, making it incomplete for safe and effective use.

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

Parameters2/5

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

Schema description coverage is 0%, meaning parameters are undocumented in the schema. The description mentions 'YES/NO/AMBIGUOUS resolution,' which hints at the 'resolution' parameter's possible values but doesn't explain 'questionId,' 'questionType,' or 'apiKey.' This partial compensation is insufficient for the low coverage, failing to fully clarify parameter meanings.

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 ('Resolve') and resource ('a Fatebook question') with specific resolution options ('YES/NO/AMBIGUOUS'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'edit_question' or 'delete_question' that might also modify questions, which prevents a perfect score.

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 such as 'edit_question' for other modifications or 'get_question' for viewing. There's no mention of prerequisites, context, or exclusions, leaving the agent with minimal usage direction.

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/an1lam/fatebook-mcp'

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