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.

EntityPurposeRelates to
purchase_orderA purchase order to a vendor, moving through the approval/receipt lifecycle.vendor
vendorA supplier the organisation purchases from, with contact, terms, and approval status.
po_lineA line item on a purchase order, tracking ordered vs received quantity and extended amount.purchase_order
po_activityAppend-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_orderadd_vendor
  • Move a purchase order through its lifecycle: create_purchase_orderapprove_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

ToolWhat it doesRequiredOptional
create_purchase_orderCreate a new purchase order.titlevendor_id, po_number, description, status, currency, subtotal

Update & advance

ToolWhat it doesRequiredOptional
add_vendorAdd a vendor.namecontact_name, email, phone, address, tax_id, status
approve_poApprove the PO.id
receive_itemsReceive items.id

Find & read

ToolWhat it doesRequiredOptional
search_ordersSearch 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

FieldTypeRequiredNotes
vendor_ididLinks to a vendor.
po_numbertext
titletextYesDisplay name.
descriptiontext
statustextLifecycle state.
currencytext
subtotalnumeric(14,2)
taxnumeric(14,2)
totalnumeric(14,2)
requested_bytext
approved_bytext
expected_datedate
ordered_attimestamp
datajsonFree-form JSON — custom fields live here.

vendor

FieldTypeRequiredNotes
nametextYesDisplay name.
contact_nametext
emailtext
phonetext
addresstext
tax_idtextExternal identifier.
statustextLifecycle state.
currencytext
payment_termstext
datajsonFree-form JSON — custom fields live here.

po_line

FieldTypeRequiredNotes
purchase_order_ididYesLinks to a purchase_order.
line_numbernumber
descriptiontextYes
skutext
quantitynumeric(14,3)
quantity_receivednumeric(14,3)
unittext
unit_pricenumeric(14,2)
amountnumeric(14,2)
datajsonFree-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_activity timeline 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"
}

See All products · Connect your assistant · Automation