ToolContext type missing metadata() method that exists at runtime #5315

Closed
opened 2026-02-16 17:51:14 -05:00 by yindo · 0 comments
Owner

Originally created by @eXamadeus on GitHub (Jan 13, 2026).

Originally assigned to: @thdxr on GitHub.

Summary

The ToolContext type is missing the metadata() method in its type definition, but the method does appear to exist at runtime.

Expected Behavior

The ToolContext type should include the metadata() method signature so TypeScript is aware of it.

Actual Behavior

TypeScript does not recognize metadata() as a valid method on ToolContext, but calling it at runtime works.

Impact

This causes type errors when trying to use metadata() in TypeScript code, requiring workarounds like type assertions.

Originally created by @eXamadeus on GitHub (Jan 13, 2026). Originally assigned to: @thdxr on GitHub. ## Summary The `ToolContext` type is missing the `metadata()` method in its type definition, but the method does appear to exist at runtime. ## Expected Behavior The `ToolContext` type should include the `metadata()` method signature so TypeScript is aware of it. ## Actual Behavior TypeScript does not recognize `metadata()` as a valid method on `ToolContext`, but calling it at runtime works. ## Impact This causes type errors when trying to use `metadata()` in TypeScript code, requiring workarounds like type assertions.
yindo closed this issue 2026-02-16 17:51:14 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#5315