# Farin MCP Server Skill

Use this skill when you are an AI agent connected to a Farin workspace via the Model Context Protocol (MCP).

## Connection Details

- **Transport**: Streamable HTTP (SSE)
- **Endpoint**: `https://farin.app/api/mcp`
- **Authentication**: `Authorization: Bearer wz_...` (your Farin API key)

## Core Tools

- `wazi_describe`: **Always use this first** to discover available domains, resources, and columns.
- `wazi_query`: Read data from any table. Supports filtering (e.g., `status.eq.pending`), sorting, and pagination.
- `wazi_mutate`: Create, update, upsert, or delete records.
- `wazi_call_action`: Call custom logic like matching bank feeds or finalizing payroll.

## Specialized Tools

- **Orders**: `orders_list`, `orders_get`, `orders_create`, `vendors_list`, `vendors_get`.
- **Customers**: `customers_list`, `customers_get`, `customers_create`, `wholesale_orders_list`, `wholesale_orders_get`.
- **Production**: `recipes_list`, `recipes_get`, `ingredients_list`.
- **Schedule**: `shifts_list`, `shifts_create`, `timecards_list`.
- **AI Intake**: `wholesale_po_intake` (parse POs), `customers_ai_intake` (parse business cards), `equipment_image_intake` (catalog assets).

## Workflow Guidelines

1. **Discover**: If you don't know the table name or columns, call `wazi_describe`.
2. **Permission Check**: If you get a 403, your API key lacks permission for that domain. Inform the user.
3. **Surgical Reads**: Use `columns` and `filter` parameters to avoid fetching massive JSON blobs.
4. **Safety**: Before deleting or performing bulk updates, summarize the plan for the user.
