treg.to Tools API

The Tools API from treg.to — 5 operation(s) for tools.

GitHub OpenAPI

Operations 7

POST /tools Create Tool #
GET /tools List Tools #
GET /tools/by-name/{name} Get Tool By Name #
PATCH /tools/{tool_id} Update Tool #
DELETE /tools/{tool_id} Delete Tool #
POST /tools/{name}/grant Grant Local Run #
POST /tools/{name}/run-report Report Local Run #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/treg-to:treg-to-tools-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

treg-to-tools-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: treg Tools API
  version: 0.0.1
tags:
- name: Tools
paths:
  /tools:
    post:
      summary: Create Tool
      operationId: create_tool_tools_post
      parameters:
      - name: x-treg-token
        in: header
        required: false
        schema:
          type: string
          default: ''
          title: X-Treg-Token
      - name: x-treg-org
        in: header
        required: false
        schema:
          type: string
          default: ''
          title: X-Treg-Org
      - name: treg_session
        in: cookie
        required: false
        schema:
          type: string
          default: ''
          title: Treg Session
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ToolIn'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                title: Response Create Tool Tools Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Tools
    get:
      summary: List Tools
      operationId: list_tools_tools_get
      parameters:
      - name: x-treg-token
        in: header
        required: false
        schema:
          type: string
          default: ''
          title: X-Treg-Token
      - name: x-treg-org
        in: header
        required: false
        schema:
          type: string
          default: ''
          title: X-Treg-Org
      - name: treg_session
        in: cookie
        required: false
        schema:
          type: string
          default: ''
          title: Treg Session
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  additionalProperties: true
                title: Response List Tools Tools Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Tools
  /tools/by-name/{name}:
    get:
      summary: Get Tool By Name
      description: Name-keyed lookup so shareable detail URLs (/app/tools/) resolve without an id.
      operationId: get_tool_by_name_tools_by_name__name__get
      parameters:
      - name: name
        in: path
        required: true
        schema:
          type: string
          title: Name
      - name: x-treg-token
        in: header
        required: false
        schema:
          type: string
          default: ''
          title: X-Treg-Token
      - name: x-treg-org
        in: header
        required: false
        schema:
          type: string
          default: ''
          title: X-Treg-Org
      - name: treg_session
        in: cookie
        required: false
        schema:
          type: string
          default: ''
          title: Treg Session
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                title: Response Get Tool By Name Tools By Name  Name  Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Tools
  /tools/{tool_id}:
    patch:
      summary: Update Tool
      operationId: update_tool_tools__tool_id__patch
      parameters:
      - name: tool_id
        in: path
        required: true
        schema:
          type: integer
          title: Tool Id
      - name: x-treg-token
        in: header
        required: false
        schema:
          type: string
          default: ''
          title: X-Treg-Token
      - name: x-treg-org
        in: header
        required: false
        schema:
          type: string
          default: ''
          title: X-Treg-Org
      - name: treg_session
        in: cookie
        required: false
        schema:
          type: string
          default: ''
          title: Treg Session
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ToolUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                title: Response Update Tool Tools  Tool Id  Patch
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Tools
    delete:
      summary: Delete Tool
      operationId: delete_tool_tools__tool_id__delete
      parameters:
      - name: tool_id
        in: path
        required: true
        schema:
          type: integer
          title: Tool Id
      - name: x-treg-token
        in: header
        required: false
        schema:
          type: string
          default: ''
          title: X-Treg-Token
      - name: x-treg-org
        in: header
        required: false
        schema:
          type: string
          default: ''
          title: X-Treg-Org
      - name: treg_session
        in: cookie
        required: false
        schema:
          type: string
          default: ''
          title: Treg Session
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                title: Response Delete Tool Tools  Tool Id  Delete
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Tools
  /tools/{name}/grant:
    post:
      summary: Grant Local Run
      description: 'Mint the process material for ONE local run of this tool''s CLI: the audited, owner-opt-in

        exception to "values are never returned". OAuth secrets release only the expiring leaf; the

        deny check happens here, where the secret lives. Unlike /call (which injects server-side and

        leaks nothing), a grant HANDS the credential value to the caller''s machine — so it needs member+

        (a viewer may call but not extract). Loosening this to a per-tool run ACL is a future policy knob.'
      operationId: grant_local_run_tools__name__grant_post
      parameters:
      - name: name
        in: path
        required: true
        schema:
          type: string
          title: Name
      - name: x-treg-token
        in: header
        required: false
        schema:
          type: string
          default: ''
          title: X-Treg-Token
      - name: x-treg-org
        in: header
        required: false
        schema:
          type: string
          default: ''
          title: X-Treg-Org
      - name: treg_session
        in: cookie
        required: false
        schema:
          type: string
          default: ''
          title: Treg Session
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GrantIn'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                title: Response Grant Local Run Tools  Name  Grant Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Tools
  /tools/{name}/run-report:
    post:
      summary: Report Local Run
      description: 'The client''s post-run verdict (it matches stderr against the grant''s error patterns LOCALLY

        and sends only this enum — raw output never leaves the machine). credential_invalid flips the

        granted secrets to invalid via the same health fields the runner uses.'
      operationId: report_local_run_tools__name__run_report_post
      parameters:
      - name: name
        in: path
        required: true
        schema:
          type: string
          title: Name
      - name: x-treg-token
        in: header
        required: false
        schema:
          type: string
          default: ''
          title: X-Treg-Token
      - name: x-treg-org
        in: header
        required: false
        schema:
          type: string
          default: ''
          title: X-Treg-Org
      - name: treg_session
        in: cookie
        required: false
        schema:
          type: string
          default: ''
          title: Treg Session
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RunReportIn'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                title: Response Report Local Run Tools  Name  Run Report Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Tools
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ToolUpdate:
      properties:
        name:
          anyOf:
          - type: string
          - type: 'null'
          title: Name
        base_url:
          anyOf:
          - type: string
          - type: 'null'
          title: Base Url
        bindings:
          anyOf:
          - items:
              additionalProperties: true
              type: object
            type: array
          - type: 'null'
          title: Bindings
        health_check:
          anyOf:
          - additionalProperties: true
            type: object
          - type: 'null'
          title: Health Check
        examples:
          anyOf:
          - items:
              additionalProperties: true
              type: object
            type: array
          - type: 'null'
          title: Examples
        cli:
          anyOf:
          - additionalProperties: true
            type: object
          - type: 'null'
          title: Cli
        project:
          anyOf:
          - type: string
          - type: integer
          - type: 'null'
          title: Project
      type: object
      title: ToolUpdate
    ToolIn:
      properties:
        name:
          type: string
          title: Name
        base_url:
          type: string
          title: Base Url
        bundle_id:
          anyOf:
          - type: integer
          - type: 'null'
          title: Bundle Id
        bindings:
          anyOf:
          - items:
              additionalProperties: true
              type: object
            type: array
          - type: 'null'
          title: Bindings
        secret_id:
          anyOf:
          - type: integer
          - type: 'null'
          title: Secret Id
        injector:
          type: string
          title: Injector
          default: env
        auth_in:
          type: string
          title: Auth In
          default: header
        auth_name:
          type: string
          title: Auth Name
          default: Authorization
        auth_format:
          type: string
          title: Auth Format
          default: Bearer {secret}
        secret_field:
          type: string
          title: Secret Field
          default: access_token
        health_check:
          anyOf:
          - additionalProperties: true
            type: object
          - type: 'null'
          title: Health Check
        examples:
          anyOf:
          - items:
              additionalProperties: true
              type: object
            type: array
          - type: 'null'
          title: Examples
        cli:
          anyOf:
          - additionalProperties: true
            type: object
          - type: 'null'
          title: Cli
        project:
          anyOf:
          - type: string
          - type: integer
          - type: 'null'
          title: Project
      type: object
      required:
      - name
      - base_url
      title: ToolIn
    RunReportIn:
      properties:
        audit_id:
          type: integer
          title: Audit Id
        exit_code:
          type: integer
          title: Exit Code
        verdict:
          type: string
          title: Verdict
      type: object
      required:
      - audit_id
      - exit_code
      - verdict
      title: RunReportIn
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    GrantIn:
      properties:
        argv:
          items:
            type: string
          type: array
          title: Argv
          default: []
      type: object
      title: GrantIn