Skip to main content
Glama

add_comment

Add comments to Fatebook prediction questions to provide context, updates, or reasoning for forecasts on the prediction tracking platform.

Instructions

Add a comment to a Fatebook question

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
questionIdYes
commentYes
apiKeyNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • main.py:307-331 (handler)
    The main handler function for the 'add_comment' tool. It is decorated with @mcp.tool() which both defines the tool schema from the function signature and registers it with the MCP server. The function validates the API key, constructs the request data, and posts to the Fatebook API endpoint to add a comment to the specified question.
    @mcp.tool()
    async def add_comment(ctx: Context, questionId: str, comment: str, apiKey: str = "") -> bool:
        """Add a comment to a Fatebook question"""
    
        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)"
            )
    
        data = {"questionId": questionId, "comment": comment, "apiKey": api_key}
    
        try:
            async with httpx.AsyncClient() as client:
                response = await client.post("https://fatebook.io/api/v0/addComment", 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
  • Alternative implementation of the 'add_comment' tool handler in the package entrypoint. Similar logic but without Context logging.
    @mcp.tool()
    async def add_comment(questionId: str, comment: str, apiKey: str = "") -> bool:
        """Add a comment 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)"
            )
    
        data = {"questionId": questionId, "comment": comment, "apiKey": api_key}
    
        try:
            async with httpx.AsyncClient() as client:
                response = await client.post("https://fatebook.io/api/v0/addComment", json=data)
                response.raise_for_status()
                return True
    
        except httpx.HTTPError:
            raise
        except Exception:
            raise
  • main.py:12-13 (registration)
    Initialization of the FastMCP server instance where all @mcp.tool() decorated functions are automatically registered.
    mcp = FastMCP("Fatebook MCP Server")
  • Initialization of the FastMCP server instance where all @mcp.tool() decorated functions are automatically registered.
    mcp = FastMCP("Fatebook MCP Server")
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 comment') which implies a write/mutation operation, but doesn't address permissions, whether comments are editable/deletable, rate limits, or what happens on success/failure. This leaves significant gaps for a mutation tool.

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 with zero wasted words. It's appropriately sized for a simple tool and front-loads the core purpose immediately.

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 has an output schema (which handles return values), no annotations, and moderate complexity (3 parameters with 0% schema coverage), the description is minimally adequate but incomplete. It states the basic purpose but lacks parameter details, behavioral context, and usage guidelines that would be helpful for an AI agent.

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%, so the schema provides no parameter documentation. The description mentions 'question' and 'comment' which map to two parameters, but doesn't explain what 'questionId' represents (e.g., ID format), what 'comment' content is allowed, or the purpose of 'apiKey' (authentication). It adds minimal value beyond parameter names.

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 comment') and the target resource ('to a Fatebook question'), providing a specific verb+resource combination. However, it doesn't differentiate from sibling tools like 'edit_question' or 'resolve_question' that might also involve question modifications, missing full sibling distinction.

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. There's no mention of prerequisites (e.g., needing an existing question), exclusions, or comparisons to other tools like 'edit_question' for modifying question content versus adding comments.

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