Skip to content

client.tools

client.tools — the tools operations.

On AsyncKindgi every method is the same, awaited.

list(
*,
limit: int | None = None,
cursor: str | None = None,
name: str | None = None,
scope_kind: Literal['tenant', 'org', 'project'] | None = None,
scope_id: str | None = None,
inherit: bool | None = None,
timeout: float | None = None,
) -> ToolCollectionPage

List tools. GET /v1/tools

Cursor-paginated list of registered tool manifests. Optional ?name= filters by prefix on tool id.

register(
*,
idempotency_key: str | None = None,
timeout: float | None = None,
**fields: Any,
) -> RegisterToolResult

Register a tool manifest. POST /v1/tools

Body is a ToolManifest (Tool minus its runtime handler). Server validates via @kindgi/tools.validateToolManifest. Metadata only: the handler is not uploaded through this route and must already be available to the runtime.

get(*, timeout: float | None = None) -> Tool

Fetch a tool manifest (latest active version). GET /v1/tools/{toolId}

Returns the latest active version of the tool. When all versions are unregistered (retired), the head row still exists but has no active version — the response is 410 tool-gone with the id, distinct from 404 tool-not-found (never registered).

list_versions(
*,
limit: int | None = None,
cursor: str | None = None,
include_tombstoned: bool | None = None,
timeout: float | None = None,
) -> ToolVersionCollectionPage

List all versions of a tool. GET /v1/tools/{toolId}/versions

Cursor-paginated list of tool versions. Defaults to active versions only. Pass ?includeTombstoned=true to include soft-tombstoned rows too; tombstoned rows carry unregisteredAt (ISO string), active rows do not.

get_version(*, timeout: float | None = None) -> Tool

Fetch a specific tool version. GET /v1/tools/{toolId}/versions/{version}

unregister(
*,
idempotency_key: str | None = None,
timeout: float | None = None,
) -> UnregisterToolResult

Unregister a specific tool version. POST /v1/tools/{toolId}/versions/{version}/unregister

reinstate_version(
*,
idempotency_key: str | None = None,
timeout: float | None = None,
) -> ReinstateToolVersionResult

Reinstate a specific tombstoned tool version. POST /v1/tools/{toolId}/versions/{version}/reinstate

Un-tombstones a previously-unregistered version: clears the tombstone on that version and recomputes the latest active version. Restores the manifest bytes verbatim (semver hygiene: reinstate never mutates). Idempotent — reinstating an active version is a no-op (returns wasTombstoned: false). Reinstating any version of a fully-retired tool reactivates the identity: subsequent GETs return 200, dispatch succeeds. Publish is always allowed regardless of retirement state — this verb is for restoring previously-unregistered bytes, not for reactivating a retired identity (a fresh publish does that).