Skip to content

float is not numeric types in json schema #984

@bitsark

Description

@bitsark

Prerequisites

  • I've searched the current open issues
  • I've updated to the latest version of Toolbox

Toolbox version

toolbox version 0.9.0+dev.darwin.amd64

Environment

  1. OS type and version: (output of uname -a)

Darwin 24.5.0 Darwin Kernel Version 24.5.0: Tue Apr 22 19:53:26 PDT 2025; root:xnu-11417.121.6~2/RELEASE_X86_64 x86_64

  1. How are you running Toolbox:

go install github.com/googleapis/genai-toolbox@latest

Client

  1. Client:

mcpcurl and mcphost

  1. Version:
  1. Example: If possible, please include your code of configuration:
    mysql.yml:
sources:
    my-mysql-source:
        kind: mysql
        host: localhost
        port: 3307
        database: classicmodels
        user: root
        password: p@55word
        queryTimeout: 30s # Optional: query timeout duration
tools:
  search_products_by_max_price:
    kind: mysql-sql
    source: my-mysql-source
    statement: |
      SELECT * FROM products
      WHERE productLine like ?
      AND buyPrice <= ?
      LIMIT 10
    description: |
      Use this tool to search products by product line and price.
      Example:
      {{
          "product-line": "Ships",
          "max-price": "888",
      }}
      Example:
      {{
          "product-line": "%L%",
          "max-price": 34,
      }}
    parameters:
      - name: product-line
        type: string
        description: productLine
      - name: max-price
        type: float
        description: max price

test by mcphost

mcpServers:
  toolbox:
    command: genai-toolbox
    args:
      - "--stdio"
      - "--tools-file"
      - "/tmp/mysql.yaml"

Expected Behavior

expected the mcp client can list the tools and invoke the tool

Current Behavior

there is error for float is not recognize

Steps to reproduce?

by mcpcurl

mcpcurl --stdio-server-cmd 'genai-toolbox --stdio --tools-file ./mysql.yaml' schema 

Additional Details

According to the json schema spec:

There are two numeric types in JSON Schema: integer and number.

Metadata

Metadata

Assignees

Labels

priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions