Skip to main content
GET
/
v1
/
tools
List Tools
curl --request GET \
  --url https://api.example.com/v1/tools
{
  "success": true,
  "data": {
    "tools": [
      {
        "name": "search_products",
        "description": "Search for products by query",
        "inputSchema": {
          "type": "object",
          "properties": {
            "query": {
              "type": "string",
              "description": "Search query"
            },
            "limit": {
              "type": "number",
              "description": "Maximum number of results",
              "default": 10
            }
          },
          "required": ["query"]
        },
        "category": "products"
      },
      {
        "name": "get_product_details",
        "description": "Get detailed information about a product",
        "inputSchema": {
          "type": "object",
          "properties": {
            "productId": {
              "type": "string",
              "description": "Product ID"
            }
          },
          "required": ["productId"]
        },
        "category": "products"
      },
      {
        "name": "add_to_cart",
        "description": "Add an item to the shopping cart",
        "inputSchema": {
          "type": "object",
          "properties": {
            "productId": {
              "type": "string",
              "description": "Product ID"
            },
            "quantity": {
              "type": "number",
              "description": "Quantity to add",
              "default": 1
            }
          },
          "required": ["productId"]
        },
        "category": "cart"
      }
    ],
    "count": 3
  },
  "meta": {
    "requestId": "req_123abc",
    "timestamp": "2024-12-11T10:00:00Z"
  }
}

Request

GET /v1/tools
Authorization: Bearer YOUR_API_KEY

Query Parameters

format
string
default:"mcp"
Response format: mcp, openai, or grok
category
string
Filter by category: products, cart, orders

Response

success
boolean
Whether the request succeeded
data
object

Example

curl https://gateway.betterdata.io/v1/tools \
  -H "Authorization: Bearer YOUR_API_KEY"
{
  "success": true,
  "data": {
    "tools": [
      {
        "name": "search_products",
        "description": "Search for products by query",
        "inputSchema": {
          "type": "object",
          "properties": {
            "query": {
              "type": "string",
              "description": "Search query"
            },
            "limit": {
              "type": "number",
              "description": "Maximum number of results",
              "default": 10
            }
          },
          "required": ["query"]
        },
        "category": "products"
      },
      {
        "name": "get_product_details",
        "description": "Get detailed information about a product",
        "inputSchema": {
          "type": "object",
          "properties": {
            "productId": {
              "type": "string",
              "description": "Product ID"
            }
          },
          "required": ["productId"]
        },
        "category": "products"
      },
      {
        "name": "add_to_cart",
        "description": "Add an item to the shopping cart",
        "inputSchema": {
          "type": "object",
          "properties": {
            "productId": {
              "type": "string",
              "description": "Product ID"
            },
            "quantity": {
              "type": "number",
              "description": "Quantity to add",
              "default": 1
            }
          },
          "required": ["productId"]
        },
        "category": "cart"
      }
    ],
    "count": 3
  },
  "meta": {
    "requestId": "req_123abc",
    "timestamp": "2024-12-11T10:00:00Z"
  }
}

Tool Categories

Products

  • search_products - Search for products
  • get_product_details - Get product details
  • check_inventory - Check stock levels
  • get_recommendations - Get product recommendations

Cart

  • add_to_cart - Add item to cart
  • remove_from_cart - Remove item from cart
  • get_cart - Get current cart
  • clear_cart - Clear all items

Orders

  • create_order - Create new order
  • get_order - Get order details
  • list_orders - List user’s orders
  • cancel_order - Cancel an order

Format Conversion

MCP Format (Claude)

GET /v1/tools?format=mcp
Returns tools in Anthropic’s MCP format for Claude Desktop.

OpenAI Format (ChatGPT)

GET /v1/tools?format=openai
Returns tools in OpenAI Function Calling format for ChatGPT.

Grok Format (X/Twitter)

GET /v1/tools?format=grok
Returns tools in Grok’s function calling format.

Next Steps