Skip to main content
Glama
study-flamingo

D&D MCP Server

update_quest

Modify quest progress by updating status or marking objectives as completed in Dungeons & Dragons campaigns.

Instructions

Update quest status or complete objectives.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleYesQuest title
statusNoNew quest status
completed_objectiveNoObjective to mark as completed

Implementation Reference

  • The MCP tool handler for 'update_quest'. Handles input parameters (schema), retrieves quest, updates status via storage helper or directly appends completed objectives, and saves changes.
    @mcp.tool
    def update_quest(
        title: Annotated[str, Field(description="Quest title")],
        status: Annotated[Literal["active", "completed", "failed", "on_hold"] | None, Field(description="New quest status")] = None,
        completed_objective: Annotated[str | None, Field(description="Objective to mark as completed")] = None,
    ) -> str:
        """Update quest status or complete objectives."""
        quest = storage.get_quest(title)
        if not quest:
            return f"Quest '{title}' not found."
    
        if status:
            storage.update_quest_status(title, status)
    
        if completed_objective:
            if completed_objective in quest.objectives and completed_objective not in quest.completed_objectives:
                quest.completed_objectives.append(completed_objective)
                storage._save_campaign()  # Direct save since we modified the object
    
        return f"Updated quest '{title}'"
  • Pydantic model for Quest data structure. Defines fields like status, objectives, and completed_objectives used in the update_quest tool logic.
    class Quest(BaseModel):
        """Quest or mission."""
        id: str = Field(default_factory=lambda: random(length=8))
        title: str
        description: str
        giver: str | None = None  # NPC who gave the quest
        status: str = "active"  # active, completed, failed, on_hold
        objectives: list[str] = Field(default_factory=list)
        completed_objectives: list[str] = Field(default_factory=list)
        reward: str | None = None
        notes: str = ""
        created_at: datetime = Field(default_factory=datetime.now)
  • Storage layer helper method that updates the status field on a Quest object and persists the campaign changes to disk.
    def update_quest_status(self, title: str, status: str) -> None:
        """Update a quest's status."""
        quest = self.get_quest(title)
        if quest:
            quest.status = status
            self._current_campaign.updated_at = datetime.now()  # type: ignore
            self._save_campaign()
  • FastMCP decorator that registers the update_quest function as a tool.
    @mcp.tool
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool updates quests, implying mutation, but doesn't describe side effects (e.g., whether changes are reversible), permissions needed, error conditions, or what happens if multiple updates conflict. For a mutation tool with zero annotation coverage, this is a significant gap in transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence: 'Update quest status or complete objectives.' It's front-loaded with the core action and avoids unnecessary words. However, it could be slightly more structured by separating status and objective updates for clarity, but it's still highly concise.

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 a mutation tool with no annotations and no output schema, the description is incomplete. It doesn't explain return values, error handling, or behavioral nuances like whether partial updates are allowed. For a tool that modifies game state in a role-playing context, more context is needed to ensure safe and effective use.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema fully documents all three parameters (title, status, completed_objective) with descriptions and types. The description adds no additional meaning beyond what's in the schema—it mentions 'status' and 'objectives' but doesn't clarify syntax, constraints, or interactions between parameters. Baseline 3 is appropriate when the schema does the heavy lifting.

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 tool's purpose: 'Update quest status or complete objectives.' It specifies the verb ('update') and resource ('quest'), and indicates what can be updated (status or objectives). However, it doesn't explicitly differentiate from sibling tools like 'create_quest' or 'list_quests' beyond the update action.

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. It doesn't mention prerequisites (e.g., needing an existing quest), exclusions, or comparisons to siblings like 'update_game_state' or 'bulk_update_characters' that might handle quest-related updates differently. Usage is implied but not explicitly stated.

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/study-flamingo/gamemaster-mcp'

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