add
Perform addition of two numbers using the tool on Flux, an AI-powered MCP server, enabling natural language interaction with AO for simplified code execution.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| a | Yes | ||
| b | Yes |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"a": {
"type": "number"
},
"b": {
"type": "number"
}
},
"required": [
"a",
"b"
],
"type": "object"
}
Implementation Reference
- src/local/index.js:25-27 (handler)The inline handler function for the 'add' MCP tool. It takes two numbers 'a' and 'b', computes their sum, and returns a content block with the result as text. Includes the schema and registration inline.server.tool("add", { a: z.number(), b: z.number() }, async ({ a, b }) => ({ content: [{ type: "text", text: String(a + b) }], }));