Skip to main content
Glama

multiply

Calculate the product of two numbers by multiplying them together using this mathematical operation tool.

Instructions

Multiply two numbers together. Args: a: The first number b: The second number Returns: The product of a and b

Input Schema

NameRequiredDescriptionDefault
aYes
bYes

Input Schema (JSON Schema)

{ "properties": { "a": { "title": "A", "type": "number" }, "b": { "title": "B", "type": "number" } }, "required": [ "a", "b" ], "type": "object" }

Implementation Reference

  • server.py:56-68 (handler)
    The multiply tool handler function, registered with the @mcp.tool() decorator. It multiplies two float inputs and returns their product. The docstring provides the schema-like description including args and return type.
    @mcp.tool() def multiply(a: float, b: float) -> float: """ Multiply two numbers together. Args: a: The first number b: The second number Returns: The product of a and b """ return a * b

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/xiaoyuchenhot/MCP-example'

If you have feedback or need assistance with the MCP directory API, please join our Discord server