@teamnetwork-nz/teamlink-mcp-server 0.5.1 → 0.5.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/build/index.js +19 -5
  2. package/package.json +1 -1
package/build/index.js CHANGED
@@ -135,23 +135,37 @@ server.tool('lookup_selectors', 'Get options for a CSSelectors list (Industry, S
135
135
  server.tool('lookup_branches', 'List branches.', {}, async () => get('/lookups/branches'));
136
136
  // --- Tasks / time (read) ---
137
137
  server.tool('task_get', 'Get a task by id.', { taskId: z.number() }, async ({ taskId }) => get(`/tasks/${taskId}`));
138
- server.tool('task_list_time_entries', 'List time/incidental entries + totals for a task.', { taskId: z.number(), type: z.enum(['time', 'incidentals', 'all']).optional() }, async ({ taskId, type }) => get(`/tasks/${taskId}/time-entries`, { type }));
139
- server.tool('task_search', 'Search/filter tasks. Supports filtering by customer/account, assigned staff member, who requested it, who created it, call type, open/closed status, a date-logged range, and/or free text. Defaults to open tasks only unless status is set. Every filter is optional and combinable.', {
138
+ server.tool('task_list_time_entries', 'List time/incidental entries + totals for a task. Can filter by staff person who performed the work (TMActivity.TMA_CSCID).', {
139
+ taskId: z.number().describe('Task ID (TMTask.TMTID / TMActivity.TMA_TMTID).'),
140
+ personId: z.number().optional().describe('Filter by staff person who performed the work (TMActivity.TMA_CSCID).'),
141
+ type: z.enum(['time', 'incidentals', 'all']).optional().describe('Entry kind based on TMActivity.TMACost: time = TMACost 0, incidentals = TMACost non-zero.'),
142
+ }, async ({ taskId, personId, type }) => get(`/tasks/${taskId}/time-entries`, { personId, type }));
143
+ server.tool('task_search_time_entries', 'Search task activity/time and incidentals across tasks. Supports filtering by taskId, staff performer (TMActivity.TMA_CSCID), date range, and entry kind.', {
144
+ taskId: z.number().optional().describe('Filter by task ID (TMActivity.TMA_TMTID).'),
145
+ personId: z.number().optional().describe('Filter by staff person who performed the work (TMActivity.TMA_CSCID).'),
146
+ type: z.enum(['time', 'incidentals', 'all']).optional().describe('Entry kind based on TMActivity.TMACost: time = TMACost 0, incidentals = TMACost non-zero.'),
147
+ dateFrom: z.string().optional().describe('Activity date range start (TMActivity.TMADate), e.g. 2026-01-01.'),
148
+ dateTo: z.string().optional().describe('Activity date range end (TMActivity.TMADate).'),
149
+ page: z.number().optional(),
150
+ pageSize: z.number().optional(),
151
+ }, async (args) => get('/tasks/time-entries/search', args));
152
+ server.tool('task_search', 'Search/filter tasks. Supports filtering by customer/account, logged-for contact, assigned staff member, entered-by staff member, call type, priority/severity, open/closed status, a date-logged range, and/or free text. Defaults to open tasks only unless status is set. Every filter is optional and combinable.', {
140
153
  q: z.string().optional().describe('Free text: exact task ID match, or partial match on task name/description.'),
141
154
  accountId: z.number().optional().describe('Filter by customer/account/company (CSAID). Maps to TMTask.TMT_CSAID — the account the task was logged for.'),
142
155
  loggedForUserId: z.number().optional().describe('Filter by the customer contact who requested/is authorising the task (TMTask.TMTLoggedBy_CSCID).'),
143
156
  assignedToUserId: z.number().optional().describe('Filter by the staff member currently assigned to the task (TMTask.TMTAssignedTo_CSCID).'),
144
157
  enteredByUserId: z.number().optional().describe('Filter by the staff member who created/logged the task (TMTask.TMTEnteredBY_CSCID).'),
145
158
  callType: z.string().optional().describe('Task/call type code: S=Support, P=T&A Project, F=FP Project, H=phoneSERVICE, I=siteSERVICE, A=Account Fee.'),
159
+ priority: z.number().optional().describe('Filter by task priority/severity (TMTask.TMTPriority), typically 1=Critical, 2=Urgent, 3=Routine, 4=Low.'),
146
160
  status: z.enum(['open', 'closed', 'all']).optional().describe('Task status (TMTStatus). Default: open.'),
147
161
  dateFrom: z.string().optional().describe('Date-logged range start (inclusive), e.g. 2026-01-01.'),
148
162
  dateTo: z.string().optional().describe('Date-logged range end (inclusive).'),
149
163
  page: z.number().optional(), pageSize: z.number().optional(),
150
164
  }, async (args) => get('/tasks/search', args));
151
165
  // --- Orders / PM (read) ---
152
- server.tool('order_get', 'Get an order header + totals.', { orderId: z.number() }, async ({ orderId }) => get(`/orders/${orderId}`));
166
+ server.tool('order_get', 'Get an order header + totals. `orderType` is returned as { code, label } from CSSelectors/OrderType.', { orderId: z.number() }, async ({ orderId }) => get(`/orders/${orderId}`));
153
167
  server.tool('order_list_items', 'List order line items.', { orderId: z.number() }, async ({ orderId }) => get(`/orders/${orderId}/items`));
154
- server.tool('order_search', 'Search/filter orders. Supports filtering by customer/account, branch, order type, a date-raised range, who entered or authorised the order, who received/approved/invoiced/returned/credited a line, received/invoiced/returned status, and/or free text (order id, invoice/credit/RA reference, or with advanced=true also notes and product codes/descriptions). Every filter is optional and combinable.', {
168
+ server.tool('order_search', 'Search/filter orders. Supports filtering by customer/account, branch, order type, a date-raised range, who entered or authorised the order, who received/approved/invoiced/returned/credited a line, received/invoiced/returned status, and/or free text (order id, invoice/credit/RA reference, or with advanced=true also notes and product codes/descriptions). Every filter is optional and combinable. Returned `orderType` is { code, label } resolved from CSSelectors/OrderType.', {
155
169
  q: z.string().optional().describe('Free text search — order id (exact), invoice/credit/RA reference (partial); with advanced=true also order notes and line product code/OEM code/descriptions.'),
156
170
  advanced: z.boolean().optional().describe('Widen `q` to also match order notes and line product code/OEM code/descriptions.'),
157
171
  accountId: z.number().optional().describe('Filter by customer/account/company (CSAID). Maps to PMOrder.PMO_CSAID.'),
@@ -164,7 +178,7 @@ server.tool('order_search', 'Search/filter orders. Supports filtering by custome
164
178
  invoicedByUserId: z.number().optional().describe('Filter by the staff member who recorded a supplier invoice on at least one line (PMDetails.PMDInvBy_CSCID).'),
165
179
  returnAuthorisedByUserId: z.number().optional().describe('Filter by the staff member who authorised a return on at least one line (PMDetails.PMDRABy_CSCID).'),
166
180
  creditedByUserId: z.number().optional().describe('Filter by the staff member who recorded a supplier credit on at least one line (PMDetails.PMDCdtBy_CSCID).'),
167
- orderType: z.string().optional().describe('Order type selector code (PMOrder.PMOType).'),
181
+ orderType: z.string().optional().describe('Filter by order type selector code (PMOrder.PMOType / CSSelectors OrderType CSSCode). Results return orderType as { code, label }.'),
168
182
  dateFrom: z.string().optional().describe('Order-date range start (inclusive), e.g. 2026-01-01.'),
169
183
  dateTo: z.string().optional().describe('Order-date range end (inclusive).'),
170
184
  received: z.enum(['yes', 'no']).optional().describe('Whether at least one line has been received. Not mutually exclusive with `no` — an order can have both received and unreceived lines.'),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teamnetwork-nz/teamlink-mcp-server",
3
- "version": "0.5.1",
3
+ "version": "0.5.4",
4
4
  "private": false,
5
5
  "description": "stdio MCP server exposing tools that proxy the TEAMlink REST API",
6
6
  "main": "build/index.js",