client.listTools(options?: ListToolsOptions)
Returns: Promise<{ success: boolean; tools: ToolMetadata[]; count: number }>
Lists available tools from the catalog with optional filtering by category or keyword search.
Official typed client library for integrating Zynocode Labs computational tools, catalog discovery, and agent capabilities in Node.js and TypeScript environments.
While the browser tools on Zynocode Labs run zero-upload client-side code, the @zynocode/sdk connects to our hosted REST API. Calls to client.executeTool() send your parameters over TLS 1.3 to Zynocode Labs servers for processing.
The package is published as @zynocode/sdk and requires Node.js 18.0.0 or later. It provides dual ESM and CommonJS distributions with bundled TypeScript declarations.
Instantiate ZynocodeClient with your configuration. If no options are provided, it automatically reads the ZYNOCODE_API_KEY, ZYNOCODE_BASE_URL, and ZYNOCODE_WORKSPACE_ID environment variables.
Entitlement Note:
API access requires an account with active API entitlements. Tool queries (listTools and getTool) do not require an API key.
Returns: Promise<{ success: boolean; tools: ToolMetadata[]; count: number }>
Lists available tools from the catalog with optional filtering by category or keyword search.
Returns: Promise<ToolMetadata>
Retrieves authoritative metadata for a single tool by its canonical slug (e.g. 'emi-calculator').
Returns: Promise<ToolExecutionResponse<T>>
Executes a tool on the server with typed input parameters and returns the execution result. Supports idempotency keys for safe retries.
{
"success": true,
"executionId": "exec_079ebe1a-a28d-4ed2-9d7a-e901b3e0b80e",
"status": "completed",
"durationMs": 1,
"creditsConsumed": 0,
"isReplayed": false,
"result": {
"words": 5,
"characters": 30,
"sentences": 1,
"paragraphs": 1,
"readingTimeMinutes": 1
},
"outputSummary": "5 words, 1 sentences, ~1 min read"
}Returns: Promise<ExecutionRecordResponse>
Fetches an existing execution record, status, and input payload by its execution ID.
The SDK exports ZynocodeError (base class) and ZynocodeApiError. When an API call fails or exceeds rate limits, ZynocodeApiError provides HTTP status code, API error code, and retryAfter seconds.
The SDK also exports builders for developing and testing tool manifests locally before deploying:
createTool(id)Fluent builder to create universal manifests with validation.
ManifestValidator.validate()Validates schema invariants, slug prefix, categories, and SEO fields.
testToolExecution(handler, input)Harness to execute tool handlers locally without a database.
assertValidManifest(manifest)Boolean validator for tool manifest compliance.