# search_within

Semantic search INSIDE a fetched record. Pass the text you already pulled (e.g. a SEC 10-K body, an article, a long tool result) plus a natural-language query; get back the top-N passages with character offsets and similarity scores. Use when the record is too big to cram into the prompt — search_within saves context, returns only the passages that matter, and every passage carries an offset so the agent can verify a verbatim quote. Pairs with ask_pipeworx_grounded: fetch with the gateway, ground over the relevant passages instead of the whole document. BGE-base-en embeddings + cosine over 500-char overlapping windows; cap is 200K chars (longer inputs are truncated and flagged).

Agent View of the PolicyLayer registry record for `search_within`. HTML page: https://policylayer.com/tools/io-github-pipeworx-io-19hz/search-within

## Facts

- Tool: `search_within`
- Server: 19hz (`https://gateway.pipeworx.io/19hz/mcp`) — https://policylayer.com/tools/io-github-pipeworx-io-19hz.md
- Homepage: https://github.com/pipeworx-io/mcp-19hz
- Risk category: Read (Low risk)
- Registry record: grade F, identity unverified
- Server auth posture: open
- Server CORS policy: *
- Server rate-limited: yes
- Parameters: 3 (2 required)
- Recommended policy verdict: Allowed

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `text` | string | yes | The document text to search inside (max ~200K chars). |
| `limit` | number | no | Max passages to return (1-20, default 5). |
| `query` | string | yes | Natural-language query — what passages do you want? E.g. "supply-chain risk", "fiscal year 2024 revenue", "drug interactions with warfarin". |

Parameters from the server's own tool schema.

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

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "search_within",
    "arguments": {
      "text": "<text>",
      "query": "<query>"
    }
  }
}
```

## Why search_within is rated Low

This tool retrieves and queries data (semantic search over document passages) with no side effects. It does not create, modify, delete, or execute code—it only extracts and ranks existing text passages for reference. The low severity reflects minimal blast radius: misuse would return irrelevant passages but cannot corrupt data, trigger external actions, or commit financial transactions.

From the tool's own definition: "Tool performs 'semantic search INSIDE a fetched record' and returns 'passages with character offsets and similarity scores'."

Risk signals: Bulk/mass operation — affects multiple targets

## Use case

AI agents call search_within to retrieve information from 19hz 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 19hz:

```json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "search_within": {}
  }
}
```

## Other tools on 19hz (31)

- `forget` — Destructive — https://policylayer.com/tools/io-github-pipeworx-io-19hz/forget.md
- `polymarket_arbitrage` — Financial — https://policylayer.com/tools/io-github-pipeworx-io-19hz/polymarket-arbitrage.md
- `polymarket_edges` — Financial — https://policylayer.com/tools/io-github-pipeworx-io-19hz/polymarket-edges.md
- `ai_visibility_check` — Read — https://policylayer.com/tools/io-github-pipeworx-io-19hz/ai-visibility-check.md
- `ask_pipeworx` — Read — https://policylayer.com/tools/io-github-pipeworx-io-19hz/ask-pipeworx.md
- `ask_pipeworx_grounded` — Read — https://policylayer.com/tools/io-github-pipeworx-io-19hz/ask-pipeworx-grounded.md
- `bet_research` — Read — https://policylayer.com/tools/io-github-pipeworx-io-19hz/bet-research.md
- `compare_entities` — Read — https://policylayer.com/tools/io-github-pipeworx-io-19hz/compare-entities.md
- `deep_research` — Read — https://policylayer.com/tools/io-github-pipeworx-io-19hz/deep-research.md
- `discover_tools` — Read — https://policylayer.com/tools/io-github-pipeworx-io-19hz/discover-tools.md
- `entity_profile` — Read — https://policylayer.com/tools/io-github-pipeworx-io-19hz/entity-profile.md
- `events` — Read — https://policylayer.com/tools/io-github-pipeworx-io-19hz/events.md
- `list_subscriptions` — Read — https://policylayer.com/tools/io-github-pipeworx-io-19hz/list-subscriptions.md
- `pipeworx_trending` — Read — https://policylayer.com/tools/io-github-pipeworx-io-19hz/pipeworx-trending.md
- `polymarket_edge_tracker` — Read — https://policylayer.com/tools/io-github-pipeworx-io-19hz/polymarket-edge-tracker.md
- `polymarket_kalshi_spread` — Read — https://policylayer.com/tools/io-github-pipeworx-io-19hz/polymarket-kalshi-spread.md
- `recall` — Read — https://policylayer.com/tools/io-github-pipeworx-io-19hz/recall.md
- `recent_alerts` — Read — https://policylayer.com/tools/io-github-pipeworx-io-19hz/recent-alerts.md
- `recent_changes` — Read — https://policylayer.com/tools/io-github-pipeworx-io-19hz/recent-changes.md
- `regions` — Read — https://policylayer.com/tools/io-github-pipeworx-io-19hz/regions.md
- `resolve_entity` — Read — https://policylayer.com/tools/io-github-pipeworx-io-19hz/resolve-entity.md
- `scan_competitor_ai_presence` — Read — https://policylayer.com/tools/io-github-pipeworx-io-19hz/scan-competitor-ai-presence.md
- `scan_dependency` — Read — https://policylayer.com/tools/io-github-pipeworx-io-19hz/scan-dependency.md
- `suggest_questions` — Read — https://policylayer.com/tools/io-github-pipeworx-io-19hz/suggest-questions.md
- `validate_claim` — Read — https://policylayer.com/tools/io-github-pipeworx-io-19hz/validate-claim.md
- `generate_llms_txt` — Write — https://policylayer.com/tools/io-github-pipeworx-io-19hz/generate-llms-txt.md
- `pipeworx_feedback` — Write — https://policylayer.com/tools/io-github-pipeworx-io-19hz/pipeworx-feedback.md
- `polymarket_fill_risk` — Write — https://policylayer.com/tools/io-github-pipeworx-io-19hz/polymarket-fill-risk.md
- `remember` — Write — https://policylayer.com/tools/io-github-pipeworx-io-19hz/remember.md
- `subscribe` — Write — https://policylayer.com/tools/io-github-pipeworx-io-19hz/subscribe.md
- …and 1 more: https://policylayer.com/tools/io-github-pipeworx-io-19hz.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-pipeworx-io-19hz · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/io-github-pipeworx-io-19hz
