Skip to content

Add WebIDL and descriptions to spec draft - #75

Merged
domfarolino merged 6 commits into
mainfrom
spec-draft-webidl
Feb 12, 2026
Merged

Add WebIDL and descriptions to spec draft#75
domfarolino merged 6 commits into
mainfrom
spec-draft-webidl

Conversation

@bwalderman

@bwalderman bwalderman commented Feb 5, 2026

Copy link
Copy Markdown
Collaborator

An initial pass at WebIDL for the current proposed API, and short descriptions of each property/method.


Preview | Diff

@beaufortfrancois beaufortfrancois left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for starting this Brandon!

Comment thread index.bs
Comment thread index.bs Outdated

<dt><dfn method for="ModelContext">registerTool(tool)</dfn></dt>
<dd>
Registers a single tool without clearing the existing set of tools. If a tool with the same name already exists, the method throws an Error.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will also raise an error in the following cases:

  • tool name is missing
  • description is missing
  • input schema is invalid

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I'll mention an error being thrown for input schema invalid. I would expect a TypeError on missing tool name or description is implied by the required keyword for these properties on ModelContextTool.

Comment thread index.bs Outdated
Comment thread index.bs Outdated
Comment thread index.bs Outdated
Comment thread index.bs Outdated
boolean readOnly;
};

callback ToolExecuteCallback = ToolResponse (object input, ModelContextClient client);

@beaufortfrancois beaufortfrancois Feb 5, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI Chromium currently defines this as Promise<any>(any... parameters);.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the return Promise to any. I'm keeping the parameters as-is since I think these are the current consensus, even if client (used for elicitation) isn't implemented in Chromium yet.

Comment thread index.bs
Comment thread index.bs Outdated
Comment thread index.bs Outdated
Comment thread index.bs Outdated
Comment thread index.bs Outdated
Comment thread index.bs Outdated
Comment thread index.bs Outdated
Comment thread index.bs Outdated

@beaufortfrancois beaufortfrancois left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment thread index.bs
bwalderman and others added 6 commits February 11, 2026 14:53
This commit resolves the
#75 (comment)
review comment, and also adds the domintro box for `clearContext()`, resolving
#75 (comment).

This commit also removes unnecessary dictionary member re-definitions, resolving
#75 (comment).
@domfarolino

Copy link
Copy Markdown
Collaborator

I rebased this PR on top of main, and pushed a commit resolving a few other comments.

@anssiko anssiko left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this baseline. We can adddress the TODOs in separate PRs.

@domfarolino domfarolino left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, we'll land this now and follow-up with changes as necessary.

@domfarolino
domfarolino merged commit 971aa24 into main Feb 12, 2026
2 checks passed
@domfarolino
domfarolino deleted the spec-draft-webidl branch February 12, 2026 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants