Query tool tag

Query the aggregate tags in a tool catalog and the number of tools corresponding to each tag. Workspace tools and system tools are queried separately and will not be combined in the same response.

GET https://moi.matrixorigin.cn/newmoi/workspaces/{workspace_id}/tools/tags

Before you call

Prepare a personal access token and target workspace ID that has access to the target workspace.

The example below uses:

  • $AI_STUDIO_API_KEY: The actual personal access token, passed through the X-API-Key Header.

  • $WORKSPACE_ID: The workspace ID to be queried is passed through the X-Workspace-ID Header.

Request example

curl "https://moi.matrixorigin.cn/newmoi/workspaces/$WORKSPACE_ID/tools/tags?catalog=workspace&status=active" \
  -H "X-API-Key: $AI_STUDIO_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID"

Path parameters

Parameters

Type

Is it required

Description

workspace_id

string

Yes

The current workspace ID used for authorization.

Query parameters

Parameters

Type

Is it required

Description

catalog

string

No

Directory to query: workspace (default) only queries the current workspace, system only queries system tools.

status

string

No

Filter by tool status, category, category, or stage.

kind

string

No

Filter by tool status, category, category, or stage.

category

string

No

Filter by tool status, category, category, or stage.

phase

string

No

Filter by tool status, category, category, or stage.

side_effect_class

string

No

Filter by side effects category.

runtime_tool_visibility

string

No

Filter by runtime visibility or binding type. runtime_tool_binding_type only supports agent.

runtime_tool_binding_type

string

No

Filter by runtime visibility or binding type. runtime_tool_binding_type only supports agent.

query

string

No

Search by name, description, localized display text or tags and then aggregate.

Successful response

Returns 200 on success. items Contains only tags with a quantity greater than zero, sorted by tag name.

{
  "code": 0,
  "data": {
    "items": [
      {
        "tag": "数据查询",
        "count": 3
      },
      {
        "tag": "运维",
        "count": 1
      }
    ]
  }
}

The response fields are as follows.

Field

Type

Description

code

integer

0 on success.

data.items

array

Aggregated tag list.

data.items[].tag

string

Tag name.

data.items[].count

integer

The number of tools using this tag within this filtering range.

[] after a type denotes an array. [] in a field path denotes each item in an array.

Error response

{
  "code": 2,
  "message": "<错误信息>"
}

Common HTTP errors

HTTP status code

error code

Common causes

Recommended actions

400

2INVALID_ARGUMENT

catalog or runtime binding type is not supported.

Set catalog to workspace or system; only use agent for binding type.

401

6UNAUTHENTICATED

Lack of valid identity credentials.

Check API Key.

403

5PERMISSION_DENIED

The current identity does not have permission to read the current workspace tool directory.

Check workspace authorization.

503

15UNAVAILABLE

Tool resource services or authorization dependencies are temporarily unavailable.

Try again later.

Follow-up operations

Save the identification of the target item, and then Query GitHub tool connection.

Last updated on