Search
The MCP server provides two search tools with different purposes: entity_search for finding forms/procedures/reports by name, and enterprise_search for full-text search across ERP business documents.
Entity Search
Use entity_search to discover what forms, procedures, and reports exist in the system. This is a metadata search – it searches entity definitions, not business data.
Search by name (faster):
{
"company_name": "mycompany",
"name_search": "ORDER"
}
Returns all entities whose name contains “ORDER” (e.g., ORDERS, ORDERITEMS, PORDERS).
Search by title:
{
"company_name": "mycompany",
"title_search": "Sales Orders"
}
Filter by category:
{
"company_name": "mycompany",
"name_search": "INVOICE",
"search_category": "procedures_and_reports"
}
Categories: forms, procedures_and_reports, or omit for all.
Key points:
- Entity names in Priority are mostly uppercase
- Titles are stored in English – translate non-English terms before searching
- Name search is faster and more precise than title search
- Results include
procedure_type(PorR) needed forprocedure_start
Enterprise Search
Use enterprise_search to find business data across indexed document types. This is a full-text search powered by a Solr search engine that covers select fields as configured in the “Document Types in Search” form within Priority.
Basic search:
{
"company_name": "mycompany",
"query": "laptop delivery delay"
}
Filtered by document type and date:
{
"company_name": "mycompany",
"query": "laptop",
"form_name": "ORDERS",
"from_date": "2026-01-01",
"to_date": "2026-08-23"
}
Response structure:
The response includes:
- Facet counts – How many results exist per document type (form). Use these to decide which
form_nameto filter by. - Results – Each with document name, type, company, internal ID, date, status, and highlighted text snippets showing where the search terms matched.
- Suggestions – Alternative search terms when zero results are found.
Recommended workflow:
- Start with a broad search (no
form_namefilter) to see facet counts - Check which document types have results
- Filter by
form_nameif you want to focus on a specific type - Use the internal ID from results with
form_fetchto get full record details
Important notes:
- Only document types configured in the “Document Types in Search” form are searchable
- Date filters use ISO format (
YYYY-MM-DD), unlike form tools which useDD/MM/YY - Maximum 50 results per page
Search vs Fetch
| Need | Tool | Why |
|---|---|---|
| Find a record by exact field value | form_fetch with filter |
Precise, structured query |
| Find records matching free text | enterprise_search |
Full-text across indexed fields |
| Find which forms/procedures exist | entity_search |
Metadata discovery |
| Get all records meeting criteria | form_fetch |
Structured filters, subforms |
Pagination
Both enterprise_search and form_fetch support pagination:
enterprise_search uses start (offset) and rows (page size):
- Page 1:
start: 0, rows: 10 - Page 2:
start: 10, rows: 10 - Page 3:
start: 20, rows: 10
form_fetch uses skip and top:
- Page 1:
skip: 0, top: 10 - Page 2:
skip: 10, top: 10 - Page 3:
skip: 20, top: 10