Skip to main content
Glama

add

Calculate the sum of two integers by providing values for both numbers to perform addition operations.

Instructions

两个整数的和相加

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aYes
bYes

Implementation Reference

  • Handler function for the 'add' MCP tool. Adds two integers a and b, decorated with @server.tool() for registration.
    @server.tool() def add(a: int, b: int) -> int: """两个整数的和相加""" return a + b
  • The register method in MyModule class where the 'add' tool is registered using @server.tool() decorator.
    def register(self, server): @server.tool() def my_tool(param: str) -> str: """自定义工具""" return f"处理参数: {param}" # 一个简单的计算器 @server.tool() def add(a: int, b: int) -> int: """两个整数的和相加""" return a + b @server.resource("my://resource") def my_resource() -> str: """自定义资源""" return "资源内容"
Install Server

Other Tools

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/gooboot/MCP-BOS'

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