🎉 Join our Discord server for chat support & discuss with other community members.

RapidMCP

Tools

Advanced tool arguments

Configure JSON Schema for tool arguments for your Rapid MCP server

Use this if you want to specify more control over the tool arguments for the model using JSON Schema.

Specification

Tool arguments object has two kinds:

{
  // Directly specify key/value type for the tool argument (Easy/simple way)
  "myValue": "my test value", // inferred as a string

  // JSON Schema (Advanced way)
  "myValue": {  
    // Specify the JSON Schema variable here in an object format
    "type": "string", // string, number, boolean, array, object, integer
    "description": "Description of what this parameter does for the model.",
    "default": "home", // Default for testing
    // ... Specify any JSON SCHEMA properties here... (see below for examples)
  },
}

Below are JSON Schema examples you can place under tool arguments..

String enum

{
  // ...
  "myEnum": { 
    "type": "string",
    "description": "Location type for the contact address",
    "enum": ["home", "work", "other"],
    "default": "home"
  }
}

String with min/max length

{
  // ...
  "myString": { 
    "type": "string",
    "description": "User's full name",
    "minLength": 3,
    "maxLength": 30,
    "default": "John Doe"
  }
}

Number with min/max

{
  // ...
  "myNumber": { 
    "type": "number",
    "description": "Latitude coordinate in decimal degrees",
    "minimum": -90,
    "maximum": 90,
    // In this example, specifying a default value does not make sense.
  }
}

Integer with min

{
  // ...
  "myInteger": { 
    "type": "integer",
    "description": "Quantity of items to process",
    "minimum": 1,
    "default": 1
  }
}

Boolean

{
  // ...
  "myBoolean": { 
    "type": "boolean",
    "description": "Whether to enable verbose logging",
    "default": true
  }
}

Array of strings

{
  // ...
  "myArray": { 
    "type": "array",
    "items": { 
      "type": "string",
    },
  }
}

Array of enum strings with length limits

{
  // ...
  "myArray": { 
    "type": "array",
    "items": { 
      "type": "string",
      "enum": ["a", "b", "c"],
    },
    "minItems": 1,
    "maxItems": 5,
  }
} 

Object with required fields

{
  // ...
  "myObject": { 
    "type": "object",
    "description": "User profile information",
    "properties": {
      "name": { 
        "type": "string", 
        "description": "User's full name",
        "minLength": 1,
        "default": "Anonymous"
      },
      "age": { 
        "type": "integer", 
        "description": "User's age in years",
        "minimum": 18,
        "default": 18
      }
    },
    "required": ["name"],
  }
}

Array of objects (with nested constraints)

{
  // ...
  "myArray": { 
    "type": "array",
    "items": { 
      "type": "object",
      "properties": {
        "id": {  "type": "string" },
        "qty": { "type": "integer" }
      },
      "required": ["id", "qty"]
    },
    "minItems": 1
  }
}

Union via oneOf / anyOf

{
  // ...
  "myUnion": { 
    "description": "Value that can be either a string or number",
    "oneOf": [ 
      { "type": "string", "default": "" }, 
      { "type": "number", "default": 0 } 
    ],
    "default": ""
  }
}

Full inputSchema example

{
  // ...
  "myInputSchema": { 
    "type": "object",
    "properties": {
      "myEnum": { 
        "type": "string", 
        "description": "Location type for the contact address",
        "enum": ["home", "work", "other"],
        "default": "home"
      },
      "latitude": { 
        "type": "number", 
        "description": "Latitude coordinate in decimal degrees",
        "minimum": -90, 
        "maximum": 90
      },
      "longitude": { 
        "type": "number", 
        "description": "Longitude coordinate in decimal degrees",
        "minimum": -180, 
        "maximum": 180
      },
      "items": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "id": { 
              "type": "string",
              "description": "Unique identifier for the item",
              "default": ""
            },
            "qty": { 
              "type": "integer", 
              "description": "Quantity of the item",
              "minimum": 1,
              "default": 1
            }
          },
          "required": ["id", "qty"]
        },
        "minItems": 1,
        "default": []
      }
    },
    "default": {
      "myEnum": "home",
      "latitude": 0,
      "longitude": 0,
      "items": []
    }
  }
}

Defaults

  • The current converter validates types and constraints but does not apply default values to missing inputs.
  • If you include a default field in your JSON schema nodes, it will be ignored by validation (no runtime filling - yet).