Skip to main content
Glama

create_question

Create prediction questions on Fatebook to track forecasts with deadlines, probabilities, and sharing options for collaborative forecasting.

Instructions

Create a new Fatebook question

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleYes
resolveByYes
forecastYes
apiKeyNo
tagsNo
sharePubliclyNo
shareWithListsNo
shareWithEmailNo
hideForecastsUntilNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes
titleYes

Implementation Reference

  • Implementation of the create_question tool handler. Posts to Fatebook API to create a question, parses the response URL to extract question ID, and returns QuestionReference.
    @mcp.tool()
    async def create_question(
        title: str,
        resolveBy: str,
        forecast: float,
        apiKey: str = "",
        tags: list[str] = [],
        sharePublicly: bool = False,
        shareWithLists: list[str] = [],
        shareWithEmail: list[str] = [],
        hideForecastsUntil: str = "",
    ) -> QuestionReference:
        """Create a new 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")
    
        params: ParamsType = {
            "apiKey": api_key,
            "title": title,
            "resolveBy": resolveBy,
            "forecast": forecast,
        }
    
        # Add optional parameters
        if tags:
            params["tags"] = ",".join(tags)
        if sharePublicly:
            params["sharePublicly"] = sharePublicly
        if shareWithLists:
            params["shareWithLists"] = ",".join(shareWithLists)
        if shareWithEmail:
            params["shareWithEmail"] = ",".join(shareWithEmail)
        if hideForecastsUntil:
            params["hideForecastsUntil"] = hideForecastsUntil
    
        try:
            async with httpx.AsyncClient() as client:
                response = await client.post("https://fatebook.io/api/v0/createQuestion", params=params)
                response.raise_for_status()
    
                # Parse the URL from the response to extract title and ID
                url = response.text.strip()
                if url.startswith("https://fatebook.io/q/"):
                    # Extract the slug part after /q/
                    slug = url.replace("https://fatebook.io/q/", "")
    
                    # Split on the last occurrence of -- to separate title and ID
                    if "--" in slug:
                        url_title, question_id = slug.rsplit("--", 1)
                        return QuestionReference(id=question_id, title=title)
                    else:
                        raise ValueError(f"Could not parse question ID from URL: {url}")
                else:
                    raise ValueError(f"Unexpected response format: {url}")
    
        except httpx.HTTPError:
            raise
        except Exception:
            raise
  • Pydantic model defining the output schema (QuestionReference) returned by create_question tool.
    class QuestionReference(BaseModel):
        """Minimal question reference with id and title"""
    
        id: str
        title: str
  • MCP tool registration decorator for create_question.
    @mcp.tool()
    async def create_question(
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 'Create' which implies a write/mutation operation, but fails to mention permissions required, rate limits, side effects (e.g., how sharing options affect visibility), or what the output schema returns. 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, clear sentence with no wasted words, making it highly concise and front-loaded. It directly states the tool's purpose without unnecessary elaboration, which is efficient for an AI agent.

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 the complexity of 9 parameters (3 required), 0% schema coverage, no annotations, and the presence of an output schema, the description is incomplete. It doesn't explain parameter meanings, usage context, or behavioral traits, relying too heavily on the output schema to cover return values while leaving other critical aspects unaddressed.

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

Parameters1/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 9 parameters have descriptions in the schema. The tool description adds no information about parameters like 'resolveBy', 'forecast', or 'sharePublicly', failing to compensate for the lack of schema documentation. This leaves all parameters semantically undefined.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Create a new Fatebook question' clearly states the action (create) and resource (Fatebook question), but it's vague about what a 'Fatebook question' entails and doesn't differentiate from sibling tools like 'edit_question' or 'resolve_question'. It specifies the resource type but lacks detail on the nature of the creation.

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?

No guidance is provided on when to use this tool versus alternatives such as 'edit_question' for updates or 'list_questions' for viewing. The description implies usage for creation but offers no context on prerequisites, timing, or exclusions, leaving the agent to infer based on tool names alone.

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