MCP server framework for managing Gmail and Google Calendar through Google Apps Script. Supports tools for retrieving/managing emails, creating labels, drafting replies, and managing calendar events.
Static source inference · medium confidence · detected: Logging
Deprecated protocol patterns detected
Summary
MCPApp presents significant gaps in definition quality. While 9 tools are declared with partial schemas and descriptions, multiple critical issues emerge: (1) Tool naming lacks consistency, 'get_massages_from_Gmail' contains a typo ('massages' vs 'messages'), and names do not follow clear verb_noun patterns uniformly. (2) Descriptions are present but often minimal or incomplete, many fall below the 50-200 char ideal range and lack 'when to use' guidance. (3) Input schemas are inconsistently specified: tools 8 ('get_today_schedule') and 2-7 have visible schemas, but tool 8 has NO input schema definition in the provided code. (4) Output schemas are NOT documented, tools return text-wrapped JSON but do not declare expected response structure. (5) No tool includes error classification, recovery hints, or actionable error messages. (6) Parameters lack validation constraints (enums, ranges, patterns). (7) No tool uses batch operations despite several accepting arrays, add_label_to_Gmail and auto_draft_creation_Gmail both iterate over obj arrays, but agents must call the tool once per batch. (8) Security concerns: credentials are not visible as parameters (good), but no audit logging, permission gates, or input sanitization is evident in the code. (9) Tool composition is poor: get_today_schedule lacks any input schema or description, making it impossible for an LLM to know when to invoke it.
Tools (9)
add_label_to_Gmailwriteauthsource verified65/100
Add labels to threads of Gmail. Don't use the invalid thread IDs.
Tool naming typo: 'get_massages_from_Gmail' should be 'get_messages_from_Gmail'. Typos in tool names break LLM invocation reliability and confuse users reading traces.
Tool 'get_today_schedule' has NO input schema and NO description. Per hard scoring rule, schema score must be 0. LLMs cannot determine when to invoke this tool or what parameters it accepts.
No output schemas documented for any tool. Tools return text-wrapped JSON, but response structure is not formally declared. LLMs cannot reliably parse or chain results.
Rename 'get_massages_from_Gmail' to 'get_messages_from_Gmail' to fix the typo.
Add a complete input schema and non-empty description to 'get_today_schedule'. E.g., inputSchema: {type: 'object', properties: {date: {type: 'string', format: 'date', description: 'The date for which to retrieve Tanaike's schedule (ISO 8601 format, e.g. 2025-03-26). Defaults to today if omitted.'}}, required: []} and description: 'Retrieve today's schedule for Tanaike. Returns a list of events with title, start time, end time, and notes.'
Add enum constraints to parameters. E.g., 'labels' in add_label_to_Gmail should reference the actual label set; 'status' in calendar tools should be 'busy' | 'free'.
Add min/max bounds to numeric parameters. E.g., 'limit' defaults to 20, range 1 - 100; 'after' must be within the last 90 days.
Enrich error messages with recovery guidance. E.g., 'Thread ID not found: 1a2b3c. Thread may have been deleted. Try get_massages_from_Gmail to retrieve current threads.' instead of 'No labels were added.'
Parameter descriptions lack validation constraints. E.g., 'date' in search_schedule_on_Google_Calendar has format 'date' but no enum or pattern constraints; 'limit' parameters missing min/max bounds; status/priority enums missing.
Error messages return raw error text ('err.message') without recovery guidance. No distinction between retryable, user-fixable, and fatal errors. E.g., 'No creation of drafted emails' does not guide the agent toward next steps.
Batch tools (add_label_to_Gmail, auto_draft_creation_Gmail) accept arrays and iterate internally, but individual error reporting is incomplete. If 1 of 10 items fails, the agent cannot distinguish successes from failures and may retry all items.
Tool 'get_image' description ('Get image from Google Drive.') is too brief (24 chars). Lacks context on format, size, and when to use vs search_files_on_Google_Drive.
No pagination or result-limiting documented. Tools like 'get_massages_from_Gmail' could return hundreds of emails without a limit parameter or pagination token. Large unbounded results waste tokens and risk context overflow.
No tool annotations (readOnlyHint, destructiveHint, idempotentHint) declared. Destructive tools like 'add_label_to_Gmail' and 'auto_draft_creation_Gmail' should be marked to guide agent safety.
No confirmation/dry-run pattern for irreversible operations. 'create_schedule_to_Google_Calendar' and 'auto_draft_creation_Gmail' immediately execute without user confirmation, risking unintended side effects.
Add pagination to get_massages_from_Gmail: introduce 'limit' (default 20) and 'pageToken' parameters; return {messages: [...], nextPageToken: '...', hasMore: boolean}.
Mark destructive tools with proper annotations. E.g., add_label_to_Gmail: {"destructiveHint": true}; get_massages_from_Gmail: {"readOnlyHint": true}.
Add a 'dryRun' parameter to auto_draft_creation_Gmail and create_schedule_to_Google_Calendar. When true, simulate the operation and return what would happen without executing. E.g., dryRun: {type: 'boolean', description: 'If true, simulate the operation without executing. Useful for validation before committing to the action.'}, or introduce a separate 'preview_draft_creation' tool.
Enhance tool descriptions with 'when to use' context. E.g., search_files_on_Google_Drive: 'Search for files in a Google Drive folder by folder name. Use this before calling get_image to locate the file you need. Returns file IDs, names, and MIME types. For full file listings, use get_folder_contents instead.' (also needs get_folder_contents tool).
Add user-friendly identifier support. E.g., accept email addresses or usernames in calendar tools, not just numeric IDs. Resolve them internally.
Document chaining requirements. E.g., 'To create a calendar event and immediately add attendees, call create_schedule_to_Google_Calendar first to obtain the eventId, then pass it to add_event_attendees.' (if such a tool exists).