Skip to content

ZOHO_MAIL tools broken: account_id typed as integer but Zoho IDs exceed JS safe integer range #3128

Description

@rashid301

Bug Report

Description

All ZOHO_MAIL_* tools fail silently when the Zoho account ID exceeds JavaScript's safe integer range (Number.MAX_SAFE_INTEGER = 2^53 - 1).

Zoho account IDs are 19-digit numbers (e.g. 6486202000000008002). When passed as a JSON integer, the value is silently truncated due to floating-point precision loss, becoming 6486202000000008000 or similar. The API then either returns empty results (data: []) or a 500 internal error.

Steps to Reproduce

  1. Get your Zoho account ID via ZOHO_MAIL_ACCOUNTS_LIST_ACCOUNTS — note it is a 19-digit number
  2. Pass that ID to any ZOHO_MAIL_* tool (e.g. ZOHO_MAIL_MESSAGES_LIST_EMAILS) as account_id
  3. Observe empty results or 500 error despite valid credentials

Expected Behavior

Tools should accept and correctly pass the full 19-digit account ID to Zoho's API.

Actual Behavior

The integer is silently truncated, Zoho cannot find the account, returns empty results or 500.

Root Cause

The account_id field in the input schema is typed as integer:

"account_id": {
  "type": "integer",
  "minimum": 1,
  "examples": [123456789]
}

Zoho account IDs are 19 digits, which exceeds Number.MAX_SAFE_INTEGER (15-16 significant digits). JSON parsers that use IEEE 754 double-precision floats lose precision on these values.

Fix

Change account_id type from integer to string across all ZOHO_MAIL_* tools:

"account_id": {
  "type": "string",
  "examples": ["6486202000000008002"]
}

This affects at minimum:

  • ZOHO_MAIL_MESSAGES_LIST_EMAILS
  • ZOHO_MAIL_SEARCH_MESSAGES
  • ZOHO_MAIL_MESSAGES_GET_MESSAGE_CONTENT
  • ZOHO_MAIL_MESSAGES_REPLY_TO_EMAIL
  • ZOHO_MAIL_ACCOUNTS_LIST_ACCOUNTS (return value also affected)

Workaround

Use Zoho's official MCP server (zoho.com/mcp) via mcp-remote instead of the Composio Zoho Mail tools. The official MCP passes account IDs as strings and works correctly.

Environment

  • Composio SDK / MCP integration
  • Zoho Mail account based in India (.in datacenter)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions