Skip to content

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

Closed

Description

@eXamadeus

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.

Activity

  1. github-actions commented on Jan 13, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Feel free to ignore if this doesn't address your specific case.

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions