Interface ExtensionContext


@ExperimentalApi public interface ExtensionContext
Server surface available while bootstrapping an extension. Experimental — the shape may change.
  • Method Details

    • tools

      Tools tools()
      Returns the tool registry façade.
    • resources

      Resources resources()
      Returns the resource registry façade.
    • prompts

      Prompts prompts()
      Returns the prompt registry façade.
    • completions

      Completions completions()
      Returns the completion registry façade.
    • tasks

      Tasks tasks()
      Returns the task runtime façade.
    • executor

      Executor executor()
      Returns the handler executor.
    • runtime

      RuntimeConfig runtime()
      Returns handler runtime settings.
    • registerHandler

      void registerHandler(String method, ExtensionMethodHandler handler)
      Registers a raw JSON-RPC method handler owned by this extension. Call from ServerExtension.bootstrap(ExtensionContext); the method is routed to this extension and gated by ServerExtension.requiresMetaEnvelope() negotiation.
      Parameters:
      method - the JSON-RPC method name to dispatch to the handler
      handler - the transport-neutral handler