name: provider-tools
description: Provider API management — list endpoints, set pricing, view analytics
version: "1.0"
author: GateFlow
tags: [provider, endpoints, pricing, analytics]

instructions: |
  These tools let API providers manage their endpoints programmatically.
  Providers can also use the dashboard UI at /dashboard for visual management.

tools:
  - name: list_endpoint
    description: List a new API endpoint on the marketplace (requires wallet signature + 5 USDC stake)
    endpoint: /api/agent-provider/list-endpoint
    method: POST
    auth: wallet_signature
    body:
      wallet_address: "0x..."
      signature: "0x..."
      stake_tx_hash: "0x..."
      name: "My Weather API"
      upstream_url: "https://api.example.com/weather"
      price_per_call_usdc: "0.001"
      http_method: "GET"
      endpoint_path: "/weather?q={city}"
      request_params:
        - name: q
          type: string
          required: true
          description: City name
          example: London

  - name: import_openapi
    description: Auto-import endpoint documentation from an OpenAPI/Swagger spec
    endpoint: /api/endpoints/import-openapi
    method: POST
    body:
      url: "https://api.example.com/openapi.json"

  - name: get_analytics
    description: View analytics for your endpoints (calls, revenue, top agents)
    endpoint: /api/provider/analytics
    method: GET
    auth: session_cookie
    params:
      - name: period
        type: string
        description: Time period (7d, 30d, 90d)
        example: "30d"

  - name: create_chain
    description: Compose multiple endpoints into a single pipeline product
    endpoint: /api/chains
    method: POST
    auth: wallet_signature
    body:
      wallet_address: "0x..."
      signature: "0x..."
      name: "Full Company Intel"
      steps:
        - endpoint_id: "uuid-1"
          slug: "company-enrichment"
        - endpoint_id: "uuid-2"
          slug: "news-headlines"
      creator_margin_usdc: "0.005"

  - name: ask_guide
    description: Ask the GateFlow Guide agent for help with setup, pricing, or integration
    endpoint: /api/agent/guide
    method: POST
    body:
      question: "How do I set up my first endpoint?"
      context: "provider"
