SafetyChain MCP by usefulapi

v1.19.1
io.usefulapi/safetychain Checked 1 day ago Published 8 hours ago

Read SafetyChain food safety records, CAPAs, forms, suppliers, items, locations and equipment.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

safetychain_list_customers List customers

List customers of the SafetyChain tenant, with ids, names, enabled flags and created/modified dates. Filter by name. The API does not page: all matches come back (cut at limit). GET /clientapis/resourcemanagement/v1.0/customers.

ParameterTypeDescription
is_deletedbooleanOnly deleted (true) or not deleted (false) rows.
is_enabledbooleanOnly enabled (true) or disabled (false) rows.
limitintegerReturn at most this many rows (default 200, max 1000); the reply says how many were cut.
namestringFilter by customer name.

safetychain_get_customer Get customer

Get one customer by id (an id from safetychain_list_customers). GET /clientapis/resourcemanagement/v1.0/customer/{id}.

ParameterTypeDescription
id *stringcustomer id

safetychain_list_locations List locations

List locations (plants, sites, areas) of the SafetyChain tenant, with ids, names, enabled flags and created/modified dates. Filter by name. The API does not page: all matches come back (cut at limit). GET /clientapis/resourcemanagement/v1.0/locations.

ParameterTypeDescription
is_deletedbooleanOnly deleted (true) or not deleted (false) rows.
is_enabledbooleanOnly enabled (true) or disabled (false) rows.
limitintegerReturn at most this many rows (default 200, max 1000); the reply says how many were cut.
namestringFilter by location name.

safetychain_get_location Get location

Get one location by id (an id from safetychain_list_locations). GET /clientapis/resourcemanagement/v1.0/location/{id}.

ParameterTypeDescription
id *stringlocation id

safetychain_list_suppliers List suppliers

List suppliers of the SafetyChain tenant, with ids, names, enabled flags and created/modified dates. Filter by name. The API does not page: all matches come back (cut at limit). GET /clientapis/resourcemanagement/v1.0/suppliers.

ParameterTypeDescription
is_deletedbooleanOnly deleted (true) or not deleted (false) rows.
is_enabledbooleanOnly enabled (true) or disabled (false) rows.
limitintegerReturn at most this many rows (default 200, max 1000); the reply says how many were cut.
namestringFilter by supplier name.

safetychain_get_supplier Get supplier

Get one supplier by id (an id from safetychain_list_suppliers). GET /clientapis/resourcemanagement/v1.0/supplier/{id}.

ParameterTypeDescription
id *stringsupplier id

safetychain_list_items List items

List items (products, ingredients, materials) of the SafetyChain tenant, with ids, names, enabled flags and created/modified dates. Filter by name. The API does not page: all matches come back (cut at limit). GET /clientapis/resourcemanagement/v1.0/items.

ParameterTypeDescription
is_deletedbooleanOnly deleted (true) or not deleted (false) rows.
is_enabledbooleanOnly enabled (true) or disabled (false) rows.
limitintegerReturn at most this many rows (default 200, max 1000); the reply says how many were cut.
namestringFilter by item name.

safetychain_get_item Get item

Get one item by id (an id from safetychain_list_items). GET /clientapis/resourcemanagement/v1.0/item/{id}.

ParameterTypeDescription
id *stringitem id

safetychain_list_equipment List equipment

List equipment of the SafetyChain tenant, with ids, names, enabled flags and created/modified dates. Filter by name. The API does not page: all matches come back (cut at limit). GET /clientapis/resourcemanagement/v1.0/equipment.

ParameterTypeDescription
is_deletedbooleanOnly deleted (true) or not deleted (false) rows.
is_enabledbooleanOnly enabled (true) or disabled (false) rows.
limitintegerReturn at most this many rows (default 200, max 1000); the reply says how many were cut.
namestringFilter by equipment name.

safetychain_get_equipment Get equipment

Get one equipment by id (an id from safetychain_list_equipment). GET /clientapis/resourcemanagement/v1.0/equipment/{id}.

ParameterTypeDescription
id *stringequipment id

safetychain_list_resources List resources

List resources of every type (customers, equipment, items, suppliers, lists) of the SafetyChain tenant, with ids, names, enabled flags and created/modified dates. Filter by name. The API does not page: all matches come back (cut at limit). GET /clientapis/resourcemanagement/v1.0/resources.

ParameterTypeDescription
is_enabledbooleanOnly enabled (true) or disabled (false) rows.
limitintegerReturn at most this many rows (default 200, max 1000); the reply says how many were cut.
namestringFilter by resource name.

safetychain_get_resource Get resource

Get one resource by id (an id from safetychain_list_resources). GET /clientapis/resourcemanagement/v1.0/resource/{id}.

ParameterTypeDescription
id *stringresource id

safetychain_list_forms List forms

List forms (the checklists and data-entry forms operators fill in) of the SafetyChain tenant, with ids, names, enabled flags and created/modified dates. Filter by name. The API does not page: all matches come back (cut at limit). GET /clientapis/resourcemanagement/v1.0/forms.

ParameterTypeDescription
is_currentbooleanOnly the current version of each form (true).
is_releasedbooleanOnly released (true) or unreleased (false) forms.
limitintegerReturn at most this many rows (default 200, max 1000); the reply says how many were cut.
namestringFilter by form name.

safetychain_get_form Get form

Get one form by id (an id from safetychain_list_forms). GET /clientapis/resourcemanagement/v1.0/form/{id}.

ParameterTypeDescription
id *stringform id

safetychain_list_categories List categories

List categories used to group resources of the SafetyChain tenant, with ids, names, enabled flags and created/modified dates. Filter by name. The API does not page: all matches come back (cut at limit). GET /clientapis/resourcemanagement/v1.0/categories.

ParameterTypeDescription
is_deletedbooleanOnly deleted (true) or not deleted (false) rows.
is_enabledbooleanOnly enabled (true) or disabled (false) rows.
limitintegerReturn at most this many rows (default 200, max 1000); the reply says how many were cut.
namestringFilter by category name.
parent_category_idstringOnly children of this category id.

safetychain_get_category Get category

Get one category by id (an id from safetychain_list_categories). GET /clientapis/resourcemanagement/v1.0/category/{id}.

ParameterTypeDescription
id *stringcategory id

safetychain_search_capas Search CAPAs

Search corrective and preventive actions (CAPA, SCAR, CCAR). Filters combine with AND. Returns id, name, severity, owner workgroup, status, event and due dates, task counts, location and template type, 50 per page. Use the Id (a GUID) with safetychain_get_capa and the other CAPA tools. POST /clientapis/capamanagement/v1.0/capas (a read: it only searches).

ParameterTypeDescription
capa_idintegerThe numeric CAPA number (CapaId).
descendingbooleanSort descending.
locationsarrayLocation names or ids (up to 10).
name_containsstringCAPA name contains this text.
owner_workgroup_containsstringOwner workgroup contains this text.
pageintegerPage number, from 1 (default 1).
page_sizeintegerRows per page (default 50, max 200).
search_termstringFree-text search term.
severitiesarraySeverity names (up to 10).
statusesarrayCAPA statuses, for example Draft, Open, Closed, Voided (up to 10).
template_typesarrayTemplate types.

safetychain_get_capa Get CAPA

Get one CAPA's details: status, severity, event and due dates, summary, creator, resource, source, category, owner workgroup, template and steps. The id is the GUID `Id` from safetychain_search_capas. GET /clientapis/capamanagement/v1.0/capa/{id}.

ParameterTypeDescription
id *stringCAPA id (GUID)

safetychain_get_capa_tasks Get CAPA tasks

List a CAPA's tasks (step, form, location, resource, workgroup, assignee, due date, status). The id is the GUID `Id` from safetychain_search_capas. GET /clientapis/capamanagement/v1.0/capa/{id}/tasks.

ParameterTypeDescription
id *stringCAPA id (GUID)
pageintegerPage number, from 1 (default 1).
page_sizeintegerRows per page (default 50, max 200).

safetychain_get_capa_attachments Get CAPA attachments

List a CAPA's attachments (name, extension, link, creator, date). The id is the GUID `Id` from safetychain_search_capas. GET /clientapis/capamanagement/v1.0/capa/{id}/attachments.

ParameterTypeDescription
id *stringCAPA id (GUID)
pageintegerPage number, from 1 (default 1).
page_sizeintegerRows per page (default 50, max 200).

safetychain_get_capa_history Get CAPA history

List a CAPA's history entries. The id is the GUID `Id` from safetychain_search_capas. GET /clientapis/capamanagement/v1.0/capa/{id}/history.

ParameterTypeDescription
id *stringCAPA id (GUID)
pageintegerPage number, from 1 (default 1).
page_sizeintegerRows per page (default 50, max 200).

safetychain_get_capa_linked_records Get CAPA linked records

List a CAPA's linked records. The id is the GUID `Id` from safetychain_search_capas. GET /clientapis/capamanagement/v1.0/capa/{id}/linkedrecords.

ParameterTypeDescription
id *stringCAPA id (GUID)
pageintegerPage number, from 1 (default 1).
page_sizeintegerRows per page (default 50, max 200).

safetychain_get_capa_linked_capas Get CAPA linked capas

List a CAPA's linked CAPAs. The id is the GUID `Id` from safetychain_search_capas. GET /clientapis/capamanagement/v1.0/capa/{id}/linkedcapas.

ParameterTypeDescription
id *stringCAPA id (GUID)
pageintegerPage number, from 1 (default 1).
page_sizeintegerRows per page (default 50, max 200).

safetychain_get_capa_activity Get CAPA activity

List a CAPA's activity (comments and events). The id is the GUID `Id` from safetychain_search_capas. GET /clientapis/capamanagement/v1.0/capa/{id}/activity.

ParameterTypeDescription
id *stringCAPA id (GUID)

safetychain_get_record Get record

Get one submitted record in full by its record id (the GUID `recordId` from safetychain_search_records): form, who submitted it and when, location, resource, field values, verifications. GET /clientapis/recordmanagement/v1.0/record/{recordId}.

ParameterTypeDescription
record_id *stringRecord id (GUID)

safetychain_record_exists Check a record exists

Check whether a record exists for a record id (GUID). GET /clientapis/recordmanagement/v1.0/record/{recordId}/Exists.

ParameterTypeDescription
record_id *stringRecord id (GUID)

safetychain_search_records Search records

Search submitted records (the headers: record number, compliance, submitted date, location, form and version, resource, who submitted, signed, verifications, ids). Filter by date range, form, location, resource, identifier and compliance. Always narrow by a date range or a name: the tenant can hold millions of records. Pages are not snapshotted: for a stable multi-page read use a closed date range (start and end in the past). Use safetychain_get_record_fields for the field values. POST /clientapis/v2.0/getRecords (a read: it only searches).

ParameterTypeDescription
date_typestringWhich date the range applies to (default submitted). processed = when SafetyChain saved it; modified = last change (includes submitted when never modified); modifiedOnly = only records actually modifi…
endstringEnd of the date range (default: now).
form_likestringForm name contains this text (slower than form_name).
form_namestringExact form name.
identifier_namestringIdentifier field name, for example Lot. Use together with identifier_value.
identifier_valuestringIdentifier value that goes with identifier_name.
is_signedbooleanOnly records with a sign-off or validation.
is_verifiedbooleanOnly verified (true) records.
location_likestringLocation name contains this text (slower).
location_namestringExact location name.
min_agointegerSliding window: records from the last N minutes (1440 = a day). Not together with start.
pageintegerPage number, from 1 (default 1).
page_rowsintegerRows per page (default 50, max 500).
record_compliancebooleanOnly compliant (true) or non-compliant (false) records. Records without compliance rules count as compliant.
record_numberintegerOne record number.
resource_likestringResource name contains this text (slower).
resource_namestringExact resource name (customer, equipment, item or supplier).
startstringStart of the date range, yyyy-mm-dd or yyyy-mm-dd hh:mm:ss. Not together with min_ago.
time_zone_offsetintegerHours from UTC applied to the date filters and the dates returned (default 0).

safetychain_get_record_fields Get record field values

Get the field-level values of records (one entry per record with its fields: name, short name, type, value, unit, compliance, min, max, target, comments, section). Same filters as safetychain_search_records; narrow strongly (a record number or one form and a short date range), each record carries many fields. POST /clientapis/v2.0/getRecordsWithFields (a read).

ParameterTypeDescription
date_typestringWhich date the range applies to (default submitted). processed = when SafetyChain saved it; modified = last change (includes submitted when never modified); modifiedOnly = only records actually modifi…
endstringEnd of the date range (default: now).
field_namesarrayOnly these fields, by full field name.
field_short_namesarrayOnly these fields, by short name.
form_likestringForm name contains this text (slower than form_name).
form_namestringExact form name.
identifier_namestringIdentifier field name, for example Lot. Use together with identifier_value.
identifier_valuestringIdentifier value that goes with identifier_name.
is_signedbooleanOnly records with a sign-off or validation.
is_verifiedbooleanOnly verified (true) records.
location_likestringLocation name contains this text (slower).
location_namestringExact location name.
min_agointegerSliding window: records from the last N minutes (1440 = a day). Not together with start.
pageintegerPage number, from 1 (default 1).
page_rowsintegerRecords per page (default 20, max 100).
record_compliancebooleanOnly compliant (true) or non-compliant (false) records. Records without compliance rules count as compliant.
record_numberintegerOne record number.
resource_likestringResource name contains this text (slower).
resource_namestringExact resource name (customer, equipment, item or supplier).
startstringStart of the date range, yyyy-mm-dd or yyyy-mm-dd hh:mm:ss. Not together with min_ago.
time_zone_offsetintegerHours from UTC applied to the date filters and the dates returned (default 0).

safetychain_get_record_summary Summarize records

Fast summary of the records matching the filters: first and last date, and how many forms, resources, locations and users are involved. Use it to size a request before safetychain_search_records. POST /clientapis/v2.0/getRecordSummary (a read).

ParameterTypeDescription
date_typestringWhich date the range applies to (default submitted). processed = when SafetyChain saved it; modified = last change (includes submitted when never modified); modifiedOnly = only records actually modifi…
endstringEnd of the date range (default: now).
form_likestringForm name contains this text (slower than form_name).
form_namestringExact form name.
identifier_namestringIdentifier field name, for example Lot. Use together with identifier_value.
identifier_valuestringIdentifier value that goes with identifier_name.
is_signedbooleanOnly records with a sign-off or validation.
is_verifiedbooleanOnly verified (true) records.
location_likestringLocation name contains this text (slower).
location_namestringExact location name.
min_agointegerSliding window: records from the last N minutes (1440 = a day). Not together with start.
record_compliancebooleanOnly compliant (true) or non-compliant (false) records. Records without compliance rules count as compliant.
record_numberintegerOne record number.
resource_likestringResource name contains this text (slower).
resource_namestringExact resource name (customer, equipment, item or supplier).
startstringStart of the date range, yyyy-mm-dd or yyyy-mm-dd hh:mm:ss. Not together with min_ago.
time_zone_offsetintegerHours from UTC applied to the date filters and the dates returned (default 0).