Metadata-Version: 2.4
Name: llama-index-tools-helve
Version: 0.1.0
Summary: LlamaIndex ToolSpec for Helve — pay-per-call AI tool gateway (313 tools, 255 providers) with spend_limit_usd caps.
Author-email: Helve <daniel.foster@helve.dev>
License: MIT
Project-URL: Homepage, https://helve.dev
Project-URL: Documentation, https://docs.helve.dev
Project-URL: llms.txt, https://helve.dev/llms.txt
Project-URL: Repository, https://github.com/helve-dev/helve-mcp
Keywords: llama-index,llamaindex,mcp,ai-agents,tools,helve
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: llama-index-core>=0.12.0
Requires-Dist: httpx>=0.27.0

# llama-index-tools-helve

LlamaIndex `BaseToolSpec` integration for [Helve](https://helve.dev) — a pay-per-call AI tool gateway exposing 313 live tools across 255 providers (web search, batch extraction, audio transcription, PDFs, LLMs, finance, email, and more) behind one API key.

- **No monthly subscriptions:** Prepaid USD 10, USD 25, or USD 100 credit packs that never expire.
- **Deterministic spend caps:** Set per-key `spend_limit_usd` limits (`402 spend_limit_exceeded` before overspend).
- **Zero charge on failed calls:** Upstream errors or timeouts are refunded automatically.
- **MCP + REST / Code Mode ready:** Works directly via `HelveToolSpec` (`search_tools`, `call_tool`, `request_tool`) or via `https://helve.dev/mcp`.

## Installation

```bash
pip install llama-index-tools-helve
```

## Quickstart

```python
from llama_index.tools.helve import HelveToolSpec

spec = HelveToolSpec()  # reads HELVE_API_KEY from environment

# 1. Discover matching tools, schemas, and pricing hints (no auth required)
results = spec.search_tools("web page extraction", limit=3)
print(results)

# 2. Call any discovered tool_id with its native input_schema
extracted = spec.call_tool(
    "helve.web_extract",
    {
        "urls": ["https://docs.helve.dev"],
        "content": {"max_chars": 4000},
    },
)
print(extracted)

# 3. Pass directly as LlamaIndex FunctionTools
tools = spec.to_tool_list()
```

## Links

- Website: https://helve.dev
- Docs: https://docs.helve.dev
- MCP Guide: https://docs.helve.dev/mcp-server
- Source: https://github.com/helve-dev/helve-mcp
