Tools Reference

This page documents all tools available on the Priority MCP Server. Each tool description includes its parameters, response format, and usage notes.

Requirements: Priority ERP version 26.0 or above.

A note on company_name: Most tools require a company_name parameter. This must be the Name field value returned by the companies tool – not the Title field.

Limitations: File and attachment operations are not currently supported. This is planned for a future release.


companies

Retrieve the list of active companies available in your Priority ERP environment.

Parameters:

Parameter Type Required Description
one_only boolean No Limit results to one company

Response:

Returns company records with two fields:

  • Name – The company identifier (use this value for company_name in other tools)
  • Title – Human-readable description

Usage notes:

  • Call this tool first to discover which companies are available
  • Only active companies are returned
  • The user’s permissions determine which companies appear

form_columns

Get column definitions and metadata for a Priority ERP form.

Parameters:

Parameter Type Required Description
root_form_name string Yes Name of the root Priority ERP form
form_name string No Name of a descendant form (empty for root form columns)
company_name string Yes Company name

Response:

Each column includes:

  • Name, Title, Type, Width (always present)
  • Decimal – Numeric precision (when applicable)
  • LinkedForm – The form that this field references. For example, a CUSTNAME field with LinkedForm: CUSTOMERS means valid values come from the CUSTOMERS form. Use this to understand field relationships and look up valid values.
  • DateFormat – Expected input format for date/time columns (e.g., DD/MM/YY)

Boolean flags (shown only when true):

  • Key – Part of the record’s unique key
  • Mandatory – Required for record creation
  • Readonly – Cannot be modified
  • Hidden – Not displayed in the UI
  • IsStatus – Status field

Usage notes:

  • Use before form_update to identify key fields (including hidden ones)
  • Key fields marked Hidden: true are still required when updating records

form_tree

Get the hierarchical form tree structure starting from a root form, showing all subforms and their relationships.

Parameters:

Parameter Type Required Description
root_form_name string Yes Name of the root form
company_name string Yes Company name

Response:

Returns a tree structure showing:

  • Root form name and title
  • Form properties (readonly, text type, subform type)
  • Nested subforms with their own properties and sub-subforms

Usage notes:

  • Use to understand which subforms are available for form_fetch and form_update
  • The tree reflects the form hierarchy as it appears in the Priority UI

form_fetch

Retrieve records from Priority ERP forms with filtering, sorting, and pagination. Supports hierarchical queries across parent/child forms.

Parameters:

Parameter Type Required Description
company_name string Yes Company name
form_tree object Yes Hierarchical form query definition (see below)

form_tree object:

Field Type Required Description
form_name string Yes Name of the form
filters array No Filter conditions
sort array No Sort conditions
top integer No Maximum records to return
skip integer No Records to skip (pagination)
subforms array No Nested subform definitions (recursive)

Filter condition:

Field Type Description
column_name string Column to filter on
operator string One of: eq, ne, gt, lt, ge, le, like, in
values array Filter values
ignore_case boolean Ignore case in string comparisons

Wildcard support (for like operator):

  • * matches any sequence of characters
  • % matches any single character

Sort condition:

Field Type Description
column_name string Column to sort by
descending boolean Sort descending (default: ascending)

Date/time format for filter values:

Format Pattern Example
Date8 DD/MM/YY 23/08/26
Date10 DD/MM/YYYY 23/08/2026
Date14 DD/MM/YY HH:MM 23/08/26 14:30
Time5 HH:MM 14:30
Time6 HHH:MM 120:00

Pagination:

  • When top is omitted, results are limited to 100 records by default
  • There is no indicator in the response when results are truncated – always specify top explicitly
  • Use top and skip together for controlled pagination through large result sets

Response notes:

  • Fields with empty, zero, or false boolean values are omitted from the response
  • A missing field means it has no value, not that it does not exist on the form

form_update

Create or update records in Priority ERP forms. Supports hierarchical operations across parent and child forms.

Parameters:

Parameter Type Required Description
company_name string Yes Company name
root_form object Yes Root form update definition (single record)
subforms array No Subform definitions with multiple records each

root_form object:

Field Type Description
form_name string Name of the form
record_keys array Key fields for existing record (empty array for new record)
field_updates array Fields to set, each with name and value

Creating records:

  • Leave record_keys empty
  • Provide only the fields the user has specified
  • Priority ERP has automatic triggers that fill most mandatory fields – do not ask for additional mandatory field data unless the server returns an error

Updating records:

  • You must provide values for ALL key fields in record_keys, including hidden ones
  • Use form_columns to identify all fields where Key: true, regardless of visibility
  • Missing any key field will cause the update to fail

Date/time formats for field values:

Type Format Example
Date8 DD/MM/YY 23/08/26
Date10 DD/MM/YYYY 23/08/2026
Date14 DD/MM/YY HH:MM 23/08/26 14:30
Time5 HH:MM 14:30
Time6 HHH:MM 120:00

Text forms (HTML):

  • Forms identified by _is_html_form: true in form_fetch results contain HTML content
  • When updating, provide content in the TEXT field using HTML format exactly as returned by form_fetch

Search for forms, procedures, and reports in Priority ERP by name or title.

Parameters:

Parameter Type Required Description
company_name string Yes Company name
name_search string No Search by entity name (faster)
title_search string No Search by entity title (must be in English)
search_category string No Filter: forms, procedures_and_reports, or empty for all

At least one of name_search or title_search must be provided.

Response:

Results are grouped into:

  • Forms – Root level forms and direct sub-level forms accessible from menu
  • Procedures and Reports – Each entry includes a procedure_type property (P for procedures, R for reports) which must be used when calling procedure_start

Usage notes:

  • Name search is faster than title search
  • Entity names in Priority are mostly uppercase
  • Titles are stored in English; translate non-English terms before searching

Full-text search across Priority ERP documents that have been configured for indexing.

Parameters:

Parameter Type Required Description
company_name string Yes Company name
query string Yes Search text
form_name string No Limit to a specific document type (e.g., ORDERS, CUSTOMERS)
from_date string No Start date filter (YYYY-MM-DD)
to_date string No End date filter (YYYY-MM-DD)
start integer No Offset for pagination (default: 0)
rows integer No Results per page (default: 10, max: 50)

Response:

Returns:

  • Total results found and current offset
  • Facet counts grouped by document type (form)
  • Result entries with document name, type, company, ID, date, status, and highlighted snippets
  • Suggestions when zero results are found

Usage notes:

  • Only searches document types configured in the “Document Types in Search” form
  • Run a broad search first to see facet counts, then use form_name to filter
  • Date filters use ISO format (YYYY-MM-DD), unlike form tools which use DD/MM/YY

procedure_start

Start a Priority ERP procedure or report and return the first step.

Parameters:

Parameter Type Required Description
procedure_name string Yes Name of the procedure or report (from entity_search)
procedure_type string Yes P for procedure, R for report
company_name string Yes Company name

Response:

Returns the first step of the procedure, including:

  • session – Session ID (required for all subsequent procedure_continue calls)
  • step_type – The type of step (see procedure_continue for handling each type)
  • Step-specific data (input fields, options, messages)

Usage notes:

  • Use entity_search to find the procedure name and determine its type (P or R)
  • The session ID must be passed to every procedure_continue call
  • See Procedures & Reports for the complete flow

procedure_continue

Continue a running procedure with the next action based on the current step type.

Parameters:

Parameter Type Required Description
session string Yes Session ID from procedure_start or previous step
company_name string Yes Company name
procedure_name string Yes Name of the procedure
procedure_type string Yes P or R
step_type string Yes Current step type from previous response
action object Yes Action data (varies by step type, see below)

Action by step type:

Step Type Action Fields Description
input fields array Respond to input fields with values
choose selected_option Select one of the presented options
warning acknowledged: true Acknowledge a warning message
newsaved / askprint selected_format, mode, pdf Choose output format
waitprocess / waitexecution (repeat call) Poll until step type changes
displayurl URL to display is in the response
download File download URL is in the response

Input fields:

When responding to an input step, you must send back ALL fields, including those you are not changing. Each field requires:

Field Description
id Field ID from the input step
operator Operator string (default: =)
value Field value
type Field type from the step definition

Current Value: Input fields may show a “Current Value” – this is the value from the last time the procedure was run, not a default. Use it as a starting point but adjust based on the current request.


help

Get help text for a Priority ERP entity (form, field, procedure, or report).

Parameters:

Parameter Type Required Description
company_name string Yes Company name
name string Yes Entity name (e.g., ORDERS, WWWSHOWORDER)
entity_type string Yes F for form, P for procedure, R for report
field_name string No Field name for field-level help (forms only)

Usage notes:

  • Returns the authoritative help text as configured in Priority ERP
  • For forms, optionally pass field_name to get help for a specific column

skill_list

Retrieve all AI skill definitions from Priority ERP.

Parameters:

Parameter Type Required Description
company_name string Yes Company name

Response:

Returns skill records with:

  • skill_code – Unique identifier for the skill
  • skill_description – Brief description of what the skill does
  • from_sync – Whether the skill was synchronized from a source

skill_fetch

Fetch the full content of a single AI skill by its code.

Parameters:

Parameter Type Required Description
company_name string Yes Company name
skill_code string Yes Skill code from skill_list results

Response:

Returns the full skill_content text for the requested skill.

Usage notes:

  • Use skill_list first to discover available skills and their codes
  • Skills contain instructions that AI agents can follow when performing Priority ERP tasks