Help Center/ CodeArts Agent/ FAQs/ MCP Service/ How Do I Enable the MCP Tool to Support High-Precision Numeric Parameters?
Updated on 2026-07-27 GMT+08:00

How Do I Enable the MCP Tool to Support High-Precision Numeric Parameters?

Symptom

After an MCP server is configured in CodeArts Agent, calling an API via the MCP protocol returns a parameter value that does not match the actual input value.

Cause Analysis

CodeArts Agent does not have a built-in high-precision number processing mechanism. Numbers that exceed the safe integer range will lose precision during JSON parsing.

Solution

On the MCP server, it is recommended that the string type be used to transfer high-precision numbers. That is, set the JSON schema type of high-precision number parameters to string.

{
  "inputSchema": {
    "type": "object",
    "properties": {
      "amount": {
        "type": "string",
        "description": "Amount in wei (high-precision integer as decimal string, e.g., '1000000000000000000')"
      }
    }
  }
}