# google-adk-strale

[Google Agent Development Kit (ADK)](https://google.github.io/adk-docs/) integration for [Strale](https://strale.dev) — 250+ independently tested and scored business data capabilities for AI agents.

Strale provides IBAN validation, VAT validation, company data across 27 countries, sanctions screening, compliance checks (KYB, AML, GDPR), invoice extraction, SSL certificate checks, and more. Every capability is quality-scored with the Strale Quality Score (SQS).

## Installation

```bash
pip install google-adk-strale
```

## Approach 1: MCP Native (Recommended)

Google ADK supports MCP natively. Point it at Strale's MCP endpoint and ADK discovers all 250+ tools automatically — no wrapper package needed:

```python
from google.adk import Agent
from google.adk.tools.mcp_tool import MCPToolset, StreamableHTTPConnectionParams

strale_tools = MCPToolset(
    connection_params=StreamableHTTPConnectionParams(
        url="https://api.strale.io/mcp",
        headers={"Authorization": "Bearer sk_live_..."},
    )
)

agent = Agent(
    model="gemini-2.0-flash",
    name="compliance_agent",
    instruction="You verify business data using Strale tools.",
    tools=[strale_tools],
)
```

This gives your agent access to all Strale tools (strale_search, strale_execute, strale_balance, etc.) with zero configuration.

## Approach 2: REST Client (Custom Tool Logic)

For fine-grained control, use `StraleClient` in ADK tool functions:

```python
from google.adk import Agent
from google_adk_strale import StraleClient

strale = StraleClient(api_key="sk_live_...")

def validate_iban(iban: str) -> dict:
    """Validate an IBAN number. Returns validity, country, bank BIC, bank name."""
    return strale.run("iban-validate", {"iban": iban})

def check_sanctions(name: str, country: str = "") -> dict:
    """Screen a name against global sanctions lists (OFAC, EU, UN)."""
    inputs = {"name": name}
    if country:
        inputs["country"] = country
    return strale.run("sanctions-check", inputs)

def lookup_company(org_number: str) -> dict:
    """Look up Swedish company data by organization number."""
    return strale.run("swedish-company-data", {"org_number": org_number})

agent = Agent(
    model="gemini-2.0-flash",
    name="compliance_agent",
    instruction="You verify business data using Strale tools.",
    tools=[validate_iban, check_sanctions, lookup_company],
)
```

## When to Use Which Approach

| | MCP Native | REST Client |
|---|---|---|
| **Setup** | 3 lines | Write each tool function |
| **Tool count** | All 250+ automatically | You choose which to expose |
| **Auth** | Bearer token via MCP | Bearer token via REST |
| **Custom logic** | No (tools are standard) | Yes (wrap, transform, combine) |
| **Offline/testing** | Needs MCP connection | Can mock StraleClient |

**Use MCP** when you want all capabilities with zero setup.
**Use REST** when you need custom input/output transformation or want to limit which tools are available.

## Discover Capabilities

```python
from google_adk_strale import StraleClient

strale = StraleClient(api_key="sk_live_...")

# List all capabilities
caps = strale.list_capabilities()
print(f"{len(caps)} capabilities available")

# Filter by category
compliance_caps = strale.list_capabilities(category="compliance")
for cap in compliance_caps:
    print(f"  {cap['slug']} — €{cap['price_cents']/100:.2f}")
```

## Capability Categories

| Category | Examples |
|----------|----------|
| **Company Data** | swedish-company-data, german-company-data, uk-company-data (27 countries) |
| **Compliance** | sanctions-check, pep-check, adverse-media-check, vat-validate |
| **Validation** | iban-validate, vat-format-validate, lei-lookup, swift-validate |
| **Finance** | exchange-rate, invoice-extract, invoice-validate |
| **Web Intelligence** | ssl-check, dns-lookup, domain-reputation, seo-audit |
| **Data Extraction** | pdf-extract, web-extract, url-to-markdown |

Full list: [strale.dev/capabilities](https://strale.dev/capabilities)

## Free Tier

5 capabilities work without an API key or signup: `email-validate`, `dns-lookup`, `json-repair`, `url-to-markdown`, `iban-validate`.

## Trust & Quality

Every Strale capability has a quality score (SQS) combining:
- **Quality Profile:** correctness, schema compliance, error handling, edge cases
- **Reliability Profile:** availability, success rate, upstream health, latency

Scores and methodology: [strale.dev/trust](https://strale.dev/trust)

## Links

- [Homepage](https://strale.dev)
- [Documentation](https://strale.dev/docs)
- [Capabilities](https://strale.dev/capabilities)
- [Pricing](https://strale.dev/pricing)
- [GitHub](https://github.com/strale-io/strale)
- [MCP Server Card](https://api.strale.io/.well-known/mcp.json)
