Skip to content

olsToolUIs initial support#1576

Draft
iNecas wants to merge 1 commit intoopenshift:mainfrom
iNecas:ols-tool-ui
Draft

olsToolUIs initial support#1576
iNecas wants to merge 1 commit intoopenshift:mainfrom
iNecas:ols-tool-ui

Conversation

@iNecas
Copy link

@iNecas iNecas commented Mar 2, 2026

Allows plugins to define 'ols.tool-ui' extensions to map the tools to react components to be rendered when the tool gets called.

Sample extensions registration:

{
  "type": "ols.tool-ui",
  "properties": {
    "id": "my-obs/my-tool",
    "component": {
      "$codeRef": "MyToolUI"
    }
  }
}

The ToolUI implemntation receives the tool details in it's argument:

type MyTool = {
  name: 'my-tool';
  args: object,
  // ...
};

export const MyToolUI React.FC<{ tool: MyTool }> = ({ tool }) => {
  // component implementation
}

Depends on openshift/lightspeed-service#2779

This allows monitoring-plugin to define a UI for obs-mcp tools
image

Related changes leveraging this feature:

Allows plugins to define 'ols.tool-ui' extensions to map the tools
to react components to be rendered when the tool gets called.

Sample extensions registration:

```json
{
  "type": "ols.tool-ui",
  "properties": {
    "id": "my-obs/my-tool",
    "component": {
      "$codeRef": "MyToolUI"
    }
  }
}
```

The ToolUI implemntation receives the tool details in it's argument:

```ts
type MyTool = {
  name: 'my-tool';
  args: object,
  // ...
};

export const MyToolUI React.FC<{ tool: MyTool }> = ({ tool }) => {
  // component implementation
}
```
@iNecas iNecas marked this pull request as draft March 2, 2026 15:40
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 2, 2026
@iNecas iNecas mentioned this pull request Mar 2, 2026
@openshift-ci openshift-ci bot requested review from syedriko and xrajesh March 2, 2026 15:41
@openshift-ci
Copy link

openshift-ci bot commented Mar 2, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign xrajesh for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant