# ContextSlim MCP API – fetch_result (GET)

> ContextSlim MCP API – fetch_result (GET) is a paid API for AI agents from contextslim.friczero.com, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-15).

Retrieves a previously cached, token-pruned JSON payload from ContextSlim's KV store using a reference ID returned by optimize_context

## Facts

- Endpoint: GET https://contextslim.friczero.com/fetch
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/contextslim-mcp-api-fetch-result-get-c10331bc
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_6lHU-sGRcpQQs43HfcSmQ

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 contextslim-mcp-api-fetch-result-get-c10331bc
```

Example prompt: I have a referenceId 'ref_12345678' from a previous ContextSlim optimize_context call — can you fetch the cached pruned payload back so I can use it in my next LLM turn?

## When to prefer this

Use this endpoint when you have already called optimize_context (or an equivalent ContextSlim pruning step) and received a referenceId, and you now need to retrieve the cached slim payload for injection into an LLM context window. Prefer this over re-running the full optimize_context call when the payload is already cached, latency is critical, and you want to minimize USDC micropayment costs by reusing cached results.

## Known failure modes

- Invalid or expired referenceId returns 404 or error status
- Missing required referenceId query parameter causes 400 bad request
- x402 payment not satisfied causes 402 Payment Required before content is served
- KV cache eviction may cause referenceId to no longer be valid
- Network timeout on fetch returns 5xx error

## How this service works

[MCP: fetch_result] Targeted JSONPath extraction (query param mode) from cached context reference.

## Output

A JSON object containing the pruned/extracted result payload keyed by the referenceId, a success status string, the referenceId echo, and a retrievedTokens count indicating how many tokens the fetched slice occupies.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "additionalProperties": {
      "type": "string"
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "result": {},
  "status": "success",
  "referenceId": "ref_12345678",
  "retrievedTokens": 9
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/contextslim-mcp-api-fetch-result-get-c10331bc/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from contextslim.friczero.com](https://www.zero.xyz/host/contextslim.friczero.com/llms.txt)
