Skip to main content
Glama
highthon-16

MCP Calendar Server

by highthon-16

complete_event

Mark calendar events as completed and update stamina levels after finishing tasks to track progress and manage energy resources.

Instructions

이벤트를 완료 상태로 변경하고 완료 후 스태미나를 설정합니다.

Args:
    event_id: 완료할 이벤트 ID
    stamina_after: 완료 후 스태미나 수치

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
event_idYes
stamina_afterYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes
titleYes
statusYes
categoryYes
durationYes
locationNo
created_atYes
start_timeYes
descriptionNo
stamina_costYes
stamina_after_completionNo

Implementation Reference

  • Primary MCP tool handler for 'complete_event' decorated with @mcp.tool(). Handles parameters, calls calendar_service.complete_event, and returns formatted response.
    @mcp.tool()
    def complete_event(event_id: int, stamina_after: int) -> CalendarEventResponse:
        """
        이벤트를 완료 상태로 변경하고 완료 후 스태미나를 설정합니다.
        
        Args:
            event_id: 완료할 이벤트 ID
            stamina_after: 완료 후 스태미나 수치
        """
        try:
            result = calendar_service.complete_event(event_id, DEFAULT_USER_ID, stamina_after)
            if result.success and result.data:
                return calendar_service.to_response(result.data)
            
            raise Exception(result.error or "이벤트 완료 처리에 실패했습니다")
            
        except CalendarException:
            raise
        except Exception as e:
            raise Exception(f"이벤트 완료 처리 중 오류가 발생했습니다: {str(e)}")
  • Core service method implementing the event completion logic: updates status to COMPLETED and sets stamina_after_completion.
    def complete_event(self, event_id: int, user_id: int, stamina_after: int) -> McpResult:
        """이벤트 완료 처리"""
        try:
            if event_id not in self.events_db:
                raise EventNotFound(event_id)
            
            event = self.events_db[event_id]
            if event.user_id != user_id:
                raise UnauthorizedAccess(user_id, event_id)
            
            event.status = EventStatus.COMPLETED
            event.stamina_after_completion = stamina_after
            
            return McpResult(success=True, data=event)
            
        except CalendarException:
            raise
        except Exception as e:
            return McpResult(success=False, error=str(e))
  • Secondary HTTP wrapper handler for 'complete_event' in FastAPI MCP endpoint.
    elif function_name == "complete_event":
        event_id = args.get("event_id")
        stamina_after = args.get("stamina_after")
        
        if not event_id:
            raise ValueError("event_id is required")
        if stamina_after is None:
            raise ValueError("stamina_after is required")
        
        result = calendar_service.complete_event(event_id, DEFAULT_USER_ID, stamina_after)
        if result.success and result.data:
            return calendar_service.to_response(result.data).dict()
        raise ValueError(result.error or "Failed to complete event")
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 mentions the tool changes an event to 'complete 상태' and sets stamina, but lacks critical details: whether this is a destructive/mutative operation, what permissions are required, if there are side effects (e.g., triggers notifications), or rate limits. For a mutation tool with zero annotation coverage, this is insufficient.

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 appropriately concise with two sentences: one stating the purpose and another listing parameters with brief explanations. It's front-loaded with the main action, and the parameter section adds necessary detail without redundancy. However, the parameter explanations could be slightly more detailed (e.g., units for stamina).

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 2 parameters) and the presence of an output schema (which handles return values), the description is moderately complete. It covers the basic purpose and parameters but lacks usage guidelines, behavioral details (e.g., error conditions), and context about how this fits with sibling tools, leaving gaps for an AI agent.

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

Parameters4/5

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

The description adds meaningful context for both parameters beyond the input schema (which has 0% description coverage). It explains that 'event_id' is for '완료할 이벤트' (the event to complete) and 'stamina_after' is for '완료 후 스태미나 수치' (stamina value after completion), clarifying their roles in the operation. This compensates well for the schema's lack of descriptions.

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 with specific verbs ('complete 상태로 변경', '설정합니다') and resources ('이벤트', '스태미나'), making it easy to understand what the tool does. However, it doesn't explicitly differentiate from sibling tools like 'update_calendar_event' or 'delete_calendar_event', which might also modify events.

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., event must be in progress), exclusions (e.g., cannot complete already completed events), or comparisons to sibling tools like 'update_calendar_event' for other modifications.

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/highthon-16/MCP'

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