Skip to main content
Glama
kaneyxx

Weekly Report Checker

by kaneyxx

check_missing_reports

Identify team members who have not submitted their weekly reports by checking submission status in Google Sheets.

Instructions

Check who hasn't submitted their weekly reports yet

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The core handler function for the 'check_missing_reports' tool. Decorated with @mcp.tool() for automatic registration in the FastMCP server. It calls the helper get_report_data() to fetch submission status from Google Sheets, computes missing reports based on NAME_LIST, and returns a formatted string listing missing submitters or '無' if all submitted.
    @mcp.tool()
    def check_missing_reports() -> str:
        """Check who hasn't submitted their weekly reports yet"""
        report_data = get_report_data()
        
        # Get names of people who haven't submitted
        missing_names = [name for name in NAME_LIST if not report_data[name]["submitted"]]
        
        # Format the response
        if missing_names:
            return f"本週未寫週報名單:{', '.join(missing_names)}"
        else:
            return "本週未寫週報名單:無"
  • Key helper function that retrieves and processes weekly report submission data from a Google Sheet named '週報'. Initializes status for all members in NAME_LIST, parses recent rows for timestamps and names, determines if submissions are recent (within ~6.5 days), and populates detailed status dictionary used by the tool handler.
    def get_report_data() -> Dict[str, Dict]:
        """Helper function to get report data from Google Sheets"""
        # Connect to Google Sheets
        sa = gspread.service_account(filename=SERVICE_ACCOUNT_FILE)
        sh = sa.open("週報")
        wks = sh.worksheet("週報")
        
        # Get current time
        current_time = datetime.datetime.now()
        
        # Dictionary to store report data for each person
        report_data = {name: {
            "submitted": False,
            "timestamp": None,
            "content": None,
            "days_ago": None
        } for name in NAME_LIST}
        
        # Check each row in the sheet
        for i in range(2, 15):  # Assuming data starts from row 2 and goes to row 14
            try:
                row = wks.get(f"A{i}:F{i}")
                if not row or not row[0][0]:  # Skip empty rows
                    continue
                    
                # Parse the timestamp from the sheet
                item_time = datetime.datetime.strptime(row[0][0], '%m/%d/%Y %H:%M:%S')
                name = row[0][2]  # Assuming name is in column C
                
                # Skip if the name is not in our list
                if name not in report_data:
                    continue
                    
                # Calculate days ago
                delta_sec = (current_time - item_time).total_seconds()
                days_ago = delta_sec / 86400  # Convert seconds to days
                
                # Check if the report was submitted within the last 6 days (518400 seconds + 12 hours buffer)
                if delta_sec < (518400 + 43200):
                    report_data[name] = {
                        "submitted": True,
                        "timestamp": item_time.strftime('%Y-%m-%d %H:%M:%S'),
                        "content": row[0][3] if len(row[0]) > 3 else "No content",  # Assuming content is in column D
                        "days_ago": round(days_ago, 1)
                    }
            except Exception:
                continue
        
        return report_data
  • Constant list of team member names expected to submit weekly reports, used by get_report_data() and the handler to check for missing submissions.
    NAME_LIST = ["陳冠宇", "林柏志", "潘班", "董屹煊", "王宇軒", "許圃瑄", "陳冠言", "黃祈緯", "黃渝凌"]
  • The @mcp.tool() decorator registers the check_missing_reports function as an MCP tool in the FastMCP server instance.
    @mcp.tool()
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 tool checks for missing reports but doesn't describe what data is returned (e.g., list of names, timestamps), how it determines 'missing' (e.g., based on deadlines), or any side effects like notifications. This leaves significant gaps for a tool with potential behavioral implications.

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 that efficiently conveys the core purpose without unnecessary details. It is front-loaded and wastes no words, making it highly concise and well-structured.

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 no parameters and an output schema exists, the description doesn't need to explain inputs or return values. However, it lacks context on how the tool operates (e.g., data sources, criteria for 'missing'), which could be important for an agent to use it effectively. The description is minimal but adequate for a simple check tool.

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 tool has 0 parameters with 100% schema description coverage, so the schema fully documents the lack of inputs. The description adds no parameter information, which is appropriate here. Baseline is 4 for zero parameters, as no compensation is needed.

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: checking who hasn't submitted weekly reports. It uses a specific verb ('check') and resource ('weekly reports'), though it doesn't explicitly differentiate from sibling tools like 'check_person_report' or 'get_submission_stats'.

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 'check_person_report' or 'get_submission_stats'. It implies usage for checking missing reports but offers no context on prerequisites, timing, or exclusions.

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/kaneyxx/weekly-report-mcp'

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