---
summary: "`RequestContextLike` — closed-field projection canvas methods now accept, so handler `Context` passes straight to `DataCanvas`/`CanvasInstance`/`IDataCanvasProvider` without a slice helper (#108)."
breaking: false
security: false
---

# 0.9.3 — 2026-05-22

Finishes the structural-assignability work started in 0.8.12. The `[key: string]: unknown` index signature on `RequestContext` was the real blocker behind the canvas API — widening optional fields to `?: T | undefined` was necessary but not sufficient. This release introduces a closed-field projection that both `Context` and `RequestContext` satisfy, and canvas signatures consume it.

## Added

- **`RequestContextLike` — closed-field projection of `RequestContext`** ([#108](https://github.com/cyanheads/mcp-ts-core/issues/108)) — new type exported from `@cyanheads/mcp-ts-core/utils`. Same canonical fields as `RequestContext` (`requestId`, `timestamp`, `tenantId?`, `traceId?`, `spanId?`, `auth?`) without the open `[key: string]: unknown` index signature. Both the handler-facing `Context` and the open `RequestContext` are structurally assignable to it.

## Changed

- **Canvas API surface accepts `RequestContextLike`** — `DataCanvas.acquire`/`drop`/`countForTenant`/`shutdown`, `CanvasInstance` (constructor stored context), `CanvasRegistry.acquire`/`drop`/`shutdown`, `IDataCanvasProvider.*`, and `DuckdbProvider.*` all widen their `context` parameter from `RequestContext` to `RequestContextLike`. Pure widening — `RequestContext` callers still work; `Context` callers now work without a slice helper.

## Fixed

- **`Context` not structurally assignable to `RequestContext`** ([#108](https://github.com/cyanheads/mcp-ts-core/issues/108)) — the 0.8.12 release note promised `await canvas.acquire(undefined, ctx)` would type-check, but the `[key: string]: unknown` index signature on `RequestContext` (which the strict, closed `Context` interface lacks) still blocked the assignment under `exactOptionalPropertyTypes`. Consumers had to keep a manual `asRequestContext(ctx)` slice (seen in `brapi-mcp-server` 0.4.10). Fixed by routing canvas signatures through the new `RequestContextLike` projection; the slice helper is no longer needed.
