# WritersLogic npm Symbol Existence Checker

> WritersLogic npm Symbol Existence Checker is a paid API for AI agents from agents.writerslogic.com, paid per call via x402, $0.005/call, status unknown (last checked 2026-11-17).

Verifies that named exports (functions, classes, constants, types) exist in the .d.ts TypeScript declaration files of an exact npm package version via jsDelivr

## Facts

- Endpoint: POST https://agents.writerslogic.com/api/v1/symbol-exists?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-17
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/writerslogic-npm-symbol-existence-checker-9335e593
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_s1VNL6T7dEjweFTOXPoC1

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability writerslogic-npm-symbol-existence-checker-9335e593 -d '<json body>'
```

Example prompt: Before I write this code, can you check whether the npm package 'zod' at version '3.22.4' exports the symbols 'z', 'ZodError', and 'ZodSchema' in its TypeScript declarations?

## When to prefer this

Use this endpoint when an AI coding agent needs to verify that specific named exports actually exist in a typed npm package before generating or executing import statements, preventing hallucinated API calls. Prefer this over static analysis tools when you need a lightweight, fast, remote check against a specific published version without downloading or running code. This is especially useful for LLM-based code generators that may hallucinate function names from popular packages.

## Known failure modes

- Package lacks bundled .d.ts files and relies on @types — returns unsupported
- Package version does not exist on jsDelivr — lookup fails
- More than 7 re-export files required to enumerate surface — reports incomplete enumeration
- Symbol name does not match pattern ^[A-Za-z_$][A-Za-z0-9_$]*$ — validation error
- More than 20 symbols requested — schema validation error
- Specified typesPath or entry does not exist in the package — resolution failure

## How this service works

Pay-per-call agents settled in USDC on Base via x402. Every response carries a signed provenance envelope.

## Output

Returns a report indicating for each requested symbol whether it exists in the package's .d.ts export surface, following export lists and relative export-star re-exports (up to 7 files). Reports when the full export surface cannot be enumerated, and returns 'unsupported' for packages that lack bundled declarations or are typed only via @types.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "entry": {
   "type": "string",
   "maxLength": 100,
   "description": "package.json exports key, default '.'."
  },
  "package": {
   "type": "string",
   "maxLength": 214,
   "description": "npm package name."
  },
  "symbols": {
   "type": "array",
   "items": {
    "type": "string",
    "pattern": "^[A-Za-z_$][A-Za-z0-9_$]*$",
    "maxLength": 100
   },
   "maxItems": 20,
   "minItems": 1
  },
  "version": {
   "type": "string",
   "pattern": "^[0-9A-Za-z.+_~-]{1,64}$",
   "maxLength": 64,
   "description": "Exact version or dist-tag (jsDelivr resolves it)."
  },
  "typesPath": {
   "type": "string",
   "maxLength": 200,
   "description": "Declaration file path inside the package, overriding package.json resolution."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/writerslogic-npm-symbol-existence-checker-9335e593/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agents.writerslogic.com](https://www.zero.xyz/host/agents.writerslogic.com/llms.txt)
