ToolkitConfig
The configuration passed to defineToolkit.
Properties
Section titled “Properties”| Property | Type | Description |
|---|---|---|
auth? | OAuth2ClientCredentials | Optional declarative auth. When set, the SDK mints/caches/attaches the credential to egress automatically (see OAuth2ClientCredentials), so handlers issue plain ctx.fetch/ctx.fetchJson calls. |
author? | string | Who wrote the toolkit. |
config? | Record<string, ManifestConfigField> | The preference fields shown in the toolkit’s settings. |
description | string | What the toolkit is for — shown in the directory and to the model. |
egress? | readonly string[] | Optional egress host allowlist (each entry a hostname or host:port). When non-empty, the SDK denies any ctx.fetch to a host not on the list (deny-by-default), in addition to the always-on block of private/loopback/ link-local addresses. Mirror the manifest egress here to make the server self-protecting even when embedded standalone; the hosted egress proxy enforces the manifest allowlist regardless. |
icon | string | A single emoji or an HTTPS URL to a square icon. |
id | string | Stable toolkit id; pattern ^[a-z0-9-]+$. |
name | string | Human-readable display name. |
scopes? | readonly string[] | The manifest-declared Trove capability scopes (e.g. ['trove:search']). Used only to auto-derive a conservative readOnlyHint default: a server that declares trove:ingest writes, so its tools are not read-only by default. Authors who set annotations.readOnlyHint explicitly override this. Optional and back-compatible — omitting it assumes no write scope. |
secrets? | readonly string[] | Credential names the toolkit reads through ctx.secret(). Names only — a value here would be a secret in a file everybody can read. |
tools | readonly ToolDefinition<ZodType<unknown, unknown, $ZodTypeInternals<unknown, unknown>>, ZodType<unknown, unknown, $ZodTypeInternals<unknown, unknown>>>[] | The tools this server exposes. At least one is required. |
version | string | Semver version string. |
visibility? | "public" | "private" | Whether the toolkit is listed publicly or kept to its owner. |