hdls Procure
hdls Procure is a headless, MCP-native procurement & vendors backend. It manages purchase orders, vendors, and approvals, operated entirely through named tools your AI assistant calls. It stands in for tools like Coupa, Procurify — same job, no UI to run.
💬 Just ask
"Raise a purchase order for 10 laptops and show me what's pending approval."
You don't call these tools yourself — just tell your assistant in plain English. Everything below is the reference for when you (or your assistant) want the exact details.
How Procure is organized
The headline entity is the purchase_order — start there, then attach the rest to it. Records connect by reference: a po_line links to a purchase_order. The po_activity table is an append-only timeline — every change and note lands there and is never edited or deleted.
| Entity | Purpose | Relates to |
|---|---|---|
purchase_order | A purchase order to a vendor, moving through the approval/receipt lifecycle. | vendor |
vendor | A supplier the organisation purchases from, with contact, terms, and approval status. | — |
po_line | A line item on a purchase order, tracking ordered vs received quantity and extended amount. | purchase_order |
po_activity | Append-only timeline of approvals, receipts, and notes for purchase orders and vendors (polymorphic via entity_type/entity_id). | — |
Common workflows
Each line is one real sequence of tool calls — your assistant chains them for you.
- Set up a purchase order end to end:
create_purchase_order→add_vendor - Move a purchase order through its lifecycle:
create_purchase_order→approve_po
Tools
Call these at https://hdls.ai/api/mcp/procurement. Required fields you must supply; optional fields refine the call. You never pass tenant_id — it is stamped server-side.
Create
| Tool | What it does | Required | Optional |
|---|---|---|---|
create_purchase_order | Create a new purchase order. | title | vendor_id, po_number, description, status, currency, subtotal |
Update & advance
| Tool | What it does | Required | Optional |
|---|---|---|---|
add_vendor | Add a vendor. | name | contact_name, email, phone, address, tax_id, status |
approve_po | Approve the PO. | id | — |
receive_items | Receive items. | id | — |
Find & read
| Tool | What it does | Required | Optional |
|---|---|---|---|
search_orders | Search orders by free-text and/or column filters (tenant-scoped, paginated). | — | search, filters, limit, orderBy |
Field lists come from the product's live schema and are embedded in each tool's own description — read the tool description for the exact, current fields.
Field reference
Every field you can set on each record. Custom fields you add live alongside these in data.
purchase_order
| Field | Type | Required | Notes |
|---|---|---|---|
vendor_id | id | Links to a vendor. | |
po_number | text | ||
title | text | Yes | Display name. |
description | text | ||
status | text | Lifecycle state. | |
currency | text | ||
subtotal | numeric(14,2) | ||
tax | numeric(14,2) | ||
total | numeric(14,2) | ||
requested_by | text | ||
approved_by | text | ||
expected_date | date | ||
ordered_at | timestamp | ||
data | json | Free-form JSON — custom fields live here. |
vendor
| Field | Type | Required | Notes |
|---|---|---|---|
name | text | Yes | Display name. |
contact_name | text | ||
email | text | ||
phone | text | ||
address | text | ||
tax_id | text | External identifier. | |
status | text | Lifecycle state. | |
currency | text | ||
payment_terms | text | ||
data | json | Free-form JSON — custom fields live here. |
po_line
| Field | Type | Required | Notes |
|---|---|---|---|
purchase_order_id | id | Yes | Links to a purchase_order. |
line_number | number | ||
description | text | Yes | |
sku | text | ||
quantity | numeric(14,3) | ||
quantity_received | numeric(14,3) | ||
unit | text | ||
unit_price | numeric(14,2) | ||
amount | numeric(14,2) | ||
data | json | Free-form JSON — custom fields live here. |
Tailor it with custom fields
Add fields without a schema change. add_custom_field defines one, list_custom_fields shows what's defined, and promote_custom_field (admin) shares a personal field with the whole workspace. The value lives in each row's data (JSON) and is set and read through the normal record tools. See Products, tools & custom fields for the full model.
Roles & safety
- Tenant isolation is automatic. Your credential is pinned to one workspace; you never pass
tenant_id, and you can only ever see your own data (enforced by Postgres row-level security). - Role-gated. Permissions run
reader < member < admin < owner. Installing a product and promoting a custom field workspace-wide need admin/owner. - History is append-only. The
po_activitytimeline is never edited or deleted — it's your audit trail.
Connect
On the concierge (https://hdls.ai/api/mcp), run install_product({ slug: "procurement" }) (admin/owner) to enable it for your workspace, then add https://hdls.ai/api/mcp/procurement as a connector in your assistant — see Connect your assistant.
A worked example
The literal call your assistant makes when you ask it to create the headline record:
Tool: create_purchase_order
Arguments: {
"title": "Acme Corp"
}