Skip to main content
Glama

add_forecast

Add a probability forecast to a prediction question on Fatebook to track and update your predictions over time.

Instructions

Add a forecast to a Fatebook question

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
questionIdYes
forecastYes
apiKeyNo
optionIdNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The core handler function for the 'add_forecast' MCP tool. It validates inputs, constructs the API payload, and makes a POST request to the Fatebook API to add the forecast. Registered via @mcp.tool() decorator.
    @mcp.tool()
    async def add_forecast(
        questionId: str, forecast: float, apiKey: str = "", optionId: str = ""
    ) -> bool:
        """Add a forecast to a Fatebook question"""
    
        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 forecast parameter
        if not 0 <= forecast <= 1:
            raise ValueError("forecast must be between 0 and 1")
    
        data = {"questionId": questionId, "forecast": forecast, "apiKey": api_key}
    
        # Add optional parameter for multi-choice questions
        if optionId:
            data["optionId"] = optionId
    
        try:
            async with httpx.AsyncClient() as client:
                response = await client.post("https://fatebook.io/api/v0/addForecast", json=data)
                response.raise_for_status()
                return True
    
        except httpx.HTTPError:
            raise
        except Exception:
            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 action ('Add a forecast') which implies a write/mutation operation, but doesn't disclose any behavioral traits such as permissions needed, whether this is idempotent, what happens if a forecast already exists, rate limits, or error conditions. This is a significant gap for a mutation tool with zero annotation coverage.

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 extremely concise at just 7 words, front-loading the core purpose without any wasted words. Every word earns its place by specifying the action and target resource efficiently.

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?

For a mutation tool with 4 parameters (2 required), 0% schema description coverage, no annotations, and sibling tools that could cause confusion, the description is inadequate. While an output schema exists (which helps with return values), the description doesn't provide enough context about when to use this tool, what the parameters mean, or the behavioral implications of adding a forecast.

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 none of the 4 parameters have descriptions in the schema. The tool description doesn't mention any parameters at all, failing to compensate for the complete lack of schema documentation. The agent must infer parameter meanings from titles like 'Questionid' and 'Forecast' without any contextual guidance.

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 ('Add a forecast') and the target resource ('to a Fatebook question'), providing a specific verb+resource combination. However, it doesn't differentiate from sibling tools like 'count_forecasts' or 'resolve_question' that also involve forecasts, leaving some ambiguity about when this specific tool should be used versus alternatives.

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 'count_forecasts' or 'resolve_question'. It doesn't mention prerequisites, context, or exclusions, leaving the agent to infer usage based solely on the tool name and parameters.

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