# dev.json-to-typescript

Infer a TypeScript interface from a sample JSON value. POST { sample, rootName? }. Handles nested objects, arrays (merged element type), and primitives; merges keys across array elements. Returns a ready-to-paste interface string.

Agent View of the PolicyLayer registry record for `dev.json-to-typescript`. HTML page: https://policylayer.com/tools/io-github-2s-io-mcp/dev.json-to-typescript

## Facts

- Tool: `dev.json-to-typescript`
- Server: Mcp (`@2sio/mcp`) — https://policylayer.com/tools/io-github-2s-io-mcp.md
- Install: `npx -y @2sio/mcp`
- Homepage: https://github.com/2s-io/sdk
- Risk category: Read (Low risk)
- Registry record: grade F, identity unverified
- Server rate-limited: no
- Parameters: 0
- Recommended policy verdict: Allowed

## Example call (MCP tools/call, JSON-RPC 2.0)

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "dev.json-to-typescript",
    "arguments": {}
  }
}
```

## Why dev.json-to-typescript is rated Low

This is a pure analysis utility that takes JSON input and produces TypeScript type definitions. It performs no writes, deletions, external command execution, or financial transactions. The tool operates entirely on provided input to generate informational output, classifying it as a Read operation with low severity even if misused by an agent.

From the tool's own definition: "Tool description explicitly states it 'infers' a TypeScript interface from a JSON sample and 'returns a ready-to-paste interface string' — purely data analysis/transformation with no modification of external state, no code execution, and no side effects…"

## Use case

AI agents call dev.json-to-typescript to retrieve information from Mcp without modifying anything. It is typically the context-gathering step in research, monitoring, and reporting workflows, before the agent takes action elsewhere.

## Recommended policy (PolicyLayer)

Verdict: **Allowed**. Enforced by the PolicyLayer MCP gateway (https://policylayer.com/mcp-gateway) before a call reaches Mcp:

```json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "dev.json-to-typescript": {}
  }
}
```

## Other tools on Mcp (571)

- `queue.ack` — Destructive — https://policylayer.com/tools/io-github-2s-io-mcp/queue.ack.md
- `store.blob-delete` — Destructive — https://policylayer.com/tools/io-github-2s-io-mcp/store.blob-delete.md
- `store.doc-delete` — Destructive — https://policylayer.com/tools/io-github-2s-io-mcp/store.doc-delete.md
- `store.kv-delete` — Destructive — https://policylayer.com/tools/io-github-2s-io-mcp/store.kv-delete.md
- `store.vector-delete` — Destructive — https://policylayer.com/tools/io-github-2s-io-mcp/store.vector-delete.md
- `watchers.cancel` — Destructive — https://policylayer.com/tools/io-github-2s-io-mcp/watchers.cancel.md
- `ai.council` — Execute — https://policylayer.com/tools/io-github-2s-io-mcp/ai.council.md
- `ai.screenshot` — Execute — https://policylayer.com/tools/io-github-2s-io-mcp/ai.screenshot.md
- `batch.run` — Execute — https://policylayer.com/tools/io-github-2s-io-mcp/batch.run.md
- `dev.preflight` — Execute — https://policylayer.com/tools/io-github-2s-io-mcp/dev.preflight.md
- `dev.regex-test` — Execute — https://policylayer.com/tools/io-github-2s-io-mcp/dev.regex-test.md
- `hash.compute` — Execute — https://policylayer.com/tools/io-github-2s-io-mcp/hash.compute.md
- `pubsub.subscribe` — Execute — https://policylayer.com/tools/io-github-2s-io-mcp/pubsub.subscribe.md
- `queue.lease` — Execute — https://policylayer.com/tools/io-github-2s-io-mcp/queue.lease.md
- `search.crawl` — Execute — https://policylayer.com/tools/io-github-2s-io-mcp/search.crawl.md
- `url.render` — Execute — https://policylayer.com/tools/io-github-2s-io-mcp/url.render.md
- `watchers.crypto-address-activity` — Execute — https://policylayer.com/tools/io-github-2s-io-mcp/watchers.crypto-address-activity.md
- `watchers.earthquake` — Execute — https://policylayer.com/tools/io-github-2s-io-mcp/watchers.earthquake.md
- `predict.crypto-updown` — Financial — https://policylayer.com/tools/io-github-2s-io-mcp/predict.crypto-updown.md
- `predict.wallet` — Financial — https://policylayer.com/tools/io-github-2s-io-mcp/predict.wallet.md
- `watchers.fear-greed` — Financial — https://policylayer.com/tools/io-github-2s-io-mcp/watchers.fear-greed.md
- `watchers.fx-rate` — Financial — https://policylayer.com/tools/io-github-2s-io-mcp/watchers.fx-rate.md
- `agent.knowledge-delta` — Other — https://policylayer.com/tools/io-github-2s-io-mcp/agent.knowledge-delta.md
- `agriculture.drought` — Read — https://policylayer.com/tools/io-github-2s-io-mcp/agriculture.drought.md
- `agriculture.stats` — Read — https://policylayer.com/tools/io-github-2s-io-mcp/agriculture.stats.md
- `ai.chat` — Read — https://policylayer.com/tools/io-github-2s-io-mcp/ai.chat.md
- `ai.classify` — Read — https://policylayer.com/tools/io-github-2s-io-mcp/ai.classify.md
- `ai.describe-image` — Read — https://policylayer.com/tools/io-github-2s-io-mcp/ai.describe-image.md
- `ai.entities` — Read — https://policylayer.com/tools/io-github-2s-io-mcp/ai.entities.md
- `ai.extract` — Read — https://policylayer.com/tools/io-github-2s-io-mcp/ai.extract.md
- …and 541 more: https://policylayer.com/tools/io-github-2s-io-mcp.md

## For agents

This record is a snapshot. Live verdicts and the full registry:

- Check every server in your MCP config at once: `npx -y policylayer stack`
- Vet a server before you add it: install the mcp-precheck skill — `npx skills add https://policylayer.com` (skill text: https://policylayer.com/skill.md)
- Query the registry over MCP: endpoint `https://api.policylayer.com/mcp` — tools `check_mcp_server`, `check_mcp_stack`, `check_tool`, `search_registry`, `get_change_events`

---

Source: the PolicyLayer MCP registry — one continuously verified record per MCP server. Full record: https://policylayer.com/registry?q=io-github-2s-io-mcp · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/io-github-2s-io-mcp
