Skip to content

ToolkitConfig

The configuration passed to defineToolkit.

PropertyTypeDescription
auth?OAuth2ClientCredentialsOptional 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?stringWho wrote the toolkit.
config?Record<string, ManifestConfigField>The preference fields shown in the toolkit’s settings.
descriptionstringWhat 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.
iconstringA single emoji or an HTTPS URL to a square icon.
idstringStable toolkit id; pattern ^[a-z0-9-]+$.
namestringHuman-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.
toolsreadonly ToolDefinition<ZodType<unknown, unknown, $ZodTypeInternals<unknown, unknown>>, ZodType<unknown, unknown, $ZodTypeInternals<unknown, unknown>>>[]The tools this server exposes. At least one is required.
versionstringSemver version string.
visibility?"public" | "private"Whether the toolkit is listed publicly or kept to its owner.