API Documentation

Complete reference for integrating Sumplus Arsenal skills into your AI agents.

Overview

Sumplus Arsenal provides a REST API, MCP (Model Context Protocol) interface, and OpenAI-compatible Function Calling for accessing skills programmatically. Skills can be called by any HTTP client or MCP-compatible AI agent.

Base URL

text
https://arsenal.sumplus.dev

Authentication

All API requests require a Bearer token. Two token types are accepted:

  • Supabase JWT — from /api/auth/login
  • API Key — from /api/auth/apikey (recommended for agents)

Important: Keep your API keys secret. Never expose them in client-side code or version control.

bash
curl -H 'Authorization: Bearer YOUR_API_KEY' https://arsenal.sumplus.dev/api/skills
typescript
const res = await fetch('/api/skills', {
  headers: {
    'Authorization': 'Bearer ' + apiKey,
  }
});

REST API

GET/api/skills

List skills with optional filtering, search, and pagination.

ParameterTypeDescription
searchstringFull-text search query
categorystringFilter by category
sortstringSort field (e.g. rating_avg.desc)
limitnumberItems per page (default: 20)
offsetnumberPagination offset (default: 0)
bash
curl 'https://arsenal.sumplus.dev/api/skills?category=Blockchain&limit=10' \
  -H 'Authorization: Bearer YOUR_API_KEY'
GET/api/skills/:id

Get full skill details including schema and ratings.

bash
curl 'https://arsenal.sumplus.dev/api/skills/SKILL_ID' \
  -H 'Authorization: Bearer YOUR_API_KEY'
POST/api/execute

Execute a skill with the provided input.

bash
curl -X POST 'https://arsenal.sumplus.dev/api/execute' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"skill_id": "SKILL_ID", "input": {"address": "0x..."}}'
typescript
const result = await fetch('/api/execute', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer ' + apiKey,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    skill_id: 'SKILL_ID',
    input: { address: '0x...' },
  }),
});
const data = await result.json();

MCP Interface

Full Model Context Protocol support. Three methods: skills/list, skills/get, skills/execute.

Claude Code configuration:

json
{
  "mcpServers": {
    "sumplus": {
      "url": "https://arsenal.sumplus.dev/mcp",
      "apiKey": "YOUR_API_KEY"
    }
  }
}

List skills:

http
POST /mcp
Content-Type: application/json
Authorization: Bearer YOUR_API_KEY

{
  "method": "skills/list",
  "params": { "category": "Blockchain", "limit": 10 }
}

Execute a skill:

http
POST /mcp
Content-Type: application/json
Authorization: Bearer YOUR_API_KEY

{
  "method": "skills/execute",
  "params": {
    "skill_id": "SKILL_ID",
    "input": { "address": "0x..." }
  }
}

Function Calling

Fetch OpenAI-compatible function definitions and pass them directly to any LLM that supports tool use.

Fetch function definitions:

http
GET /api/functions?category=Blockchain
Authorization: Bearer YOUR_API_KEY

# Returns OpenAI-compatible function definitions array

Example function definition returned:

json
{
  "name": "sui_blockchain_toolkit",
  "description": "Interact with the SUI blockchain network",
  "parameters": {
    "type": "object",
    "required": [
      "action",
      "address"
    ],
    "properties": {
      "action": {
        "type": "string",
        "enum": [
          "get_balance",
          "get_tokens",
          "get_nfts"
        ]
      },
      "address": {
        "type": "string",
        "description": "SUI wallet address (0x...)"
      }
    }
  }
}

Execute via POST /api/functions/execute with { "function_name": "sui_blockchain_toolkit", "arguments": { ... } }

Router

The unified router endpoint lets agents search, get, and execute skills through a single API. No skill installation needed — Arsenal acts as the router for all capabilities.

Search:

http
POST /api/router
Content-Type: application/json
Authorization: Bearer YOUR_API_KEY

{
  "action": "search",
  "query": "SUI blockchain balance"
}

Execute:

http
POST /api/router
Content-Type: application/json
Authorization: Bearer YOUR_API_KEY

{
  "action": "execute",
  "skill_id": "SKILL_ID",
  "input": { "action": "get_balance", "address": "0x..." }
}

Error Codes

CodeStatusDescription
200OKRequest succeeded
400Bad RequestInvalid input or schema validation failed
401UnauthorizedMissing or invalid API key
402Payment RequiredPaid skill — payment not verified
403ForbiddenInsufficient permissions
404Not FoundSkill not found
500Server ErrorInternal server error