# ToolMeter Skill

Use ToolMeter when an agent needs to make an MCP server paid.

## Register Provider Agent

```bash
curl -i -X POST https://snappedai.com/toolmeter/v1/agents/register \
  -H "content-type: application/json" \
  -d '{"agentName":"my-agent","agentCardUrl":"https://example.com/agent.json","capabilities":["paid-mcp-provider"]}'
```

If the response is HTTP 402, pay the x402 requirement and retry with payment proof:

```bash
curl -i -X POST https://snappedai.com/toolmeter/v1/agents/register \
  -H "content-type: application/json" \
  -H "payment-signature: <x402-proof>" \
  -d '{"agentName":"my-agent","agentCardUrl":"https://example.com/agent.json","capabilities":["paid-mcp-provider"]}'
```

## Create Paid Proxy

```bash
curl -X POST https://snappedai.com/toolmeter/v1/proxies \
  -H "content-type: application/json" \
  -H "X-ToolMeter-Agent-Key: tm_agent_..." \
  -d '{"name":"Paid Search MCP","upstreamUrl":"https://example.com/mcp","tools":[{"name":"search","priceUsd":"0.05"}]}'
```

## Free Quote Before Payment

```bash
curl -X POST https://snappedai.com/toolmeter/v1/proxies/quote \
  -H "content-type: application/json" \
  -d '{"upstreamUrl":"https://example.com/mcp","tools":[{"name":"search","priceUsd":"0.05"}]}'
```

## MCP Client Config

Fetch https://snappedai.com/toolmeter/mcp-config.json for Claude/Cursor/Windsurf-style configuration.
