@teamnetwork-nz/teamlink-mcp-server 0.6.4 → 0.6.6
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.
- package/dist/index.js +17 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -209,7 +209,7 @@ strictTool('crm_search_contacts', 'Search contacts. `cscId` is canonical for CSC
|
|
|
209
209
|
role: z.string().optional().describe(roleDescription),
|
|
210
210
|
page: z.number().optional(), pageSize: z.number().optional(),
|
|
211
211
|
}, async (args) => get('/contacts/search', args));
|
|
212
|
-
strictTool('crm_get_contact', 'Get one contact by id. Response includes `role` (CSCClass) and `typeFlags` (contact type, distinct from role), `homeAccountId` (the CSAID this contact belongs to), and `isActive` — sourced from the CSPivotContactAccount pivot (CSPCA_Active), NOT the legacy/unused CSCActive column. An inactive contact may still be returned for historical/reporting purposes.
|
|
212
|
+
strictTool('crm_get_contact', 'Get one contact by id. Response includes `role` (CSCClass) and `typeFlags` (contact type, distinct from role), `homeAccountId` (the CSAID this contact belongs to), and `isActive` — sourced from the CSPivotContactAccount pivot (CSPCA_Active), NOT the legacy/unused CSCActive column. An inactive contact may still be returned for historical/reporting purposes. Credentials are never returned.', { contactId: z.number() }, async ({ contactId }) => get(`/contacts/${contactId}`));
|
|
213
213
|
if (READWRITE) {
|
|
214
214
|
strictTool('crm_create_contact', 'Create a contact under an account (also creates the active account link). Role is gated by a staff ' +
|
|
215
215
|
'hierarchy (A > M > E > {S,T,P} > C): the calling key\'s own role must outrank the role being assigned, ' +
|
|
@@ -223,9 +223,8 @@ if (READWRITE) {
|
|
|
223
223
|
strictTool('crm_update_contact', 'Update a contact. `active` sets CSPivotContactAccount.CSPCA_Active for the account context (the legacy ' +
|
|
224
224
|
'CSCActive column is never written). Both the contact\'s CURRENT role and the role being set to are gated ' +
|
|
225
225
|
'by the same staff hierarchy as crm_create_contact (A > M > E > {S,T,P} > C, Admin unrestricted) — the call ' +
|
|
226
|
-
'403s (role_hierarchy_violation) if the calling key cannot manage either one.
|
|
227
|
-
'
|
|
228
|
-
'and enforces 8-15 chars with upper/lower/digit.', {
|
|
226
|
+
'403s (role_hierarchy_violation) if the calling key cannot manage either one. Credentials are not settable ' +
|
|
227
|
+
'through contact tools or endpoints.', {
|
|
229
228
|
contactId: z.number(), firstName: z.string(), lastName: z.string(), email: z.string(), mobile: z.string().optional(),
|
|
230
229
|
role: z.string().optional().describe(roleDescription),
|
|
231
230
|
active: z.boolean().optional().describe('Sets CSPCA_Active (pivot) for the account context, not CSCActive.'),
|
|
@@ -234,6 +233,20 @@ if (READWRITE) {
|
|
|
234
233
|
// --- Lookups ---
|
|
235
234
|
strictTool('lookup_selectors', 'Get options for a CSSelectors list (Industry, Source, SalesStatus, OrderType, IncomeCat, City, Country, ...).', { selectorClass: z.string() }, async ({ selectorClass }) => get(`/lookups/selectors/${encodeURIComponent(selectorClass)}`));
|
|
236
235
|
strictTool('lookup_branches', 'List branches.', {}, async () => get('/lookups/branches'));
|
|
236
|
+
// --- Account fees (read) ---
|
|
237
|
+
strictTool('fee_get', 'Get one account fee record from vw_CSFee by feeId. Returns the account, logged-by and assigned-to people, task snapshot, time/income details, quantity/unit cost, and action metadata.', { feeId: z.number().describe('Fee record ID (CSFee.CSFeeId).') }, async ({ feeId }) => get(`/fees/${feeId}`));
|
|
238
|
+
strictTool('fee_search', 'Search the read-only account fee view (vw_CSFee). Filter by account, logged-by or assigned-to person, fee period, action type, start-date range, or free text. Results are newest-starting first.', {
|
|
239
|
+
q: z.string().optional().describe('Exact feeId or partial account, task, time, PO reference, action-note, or fee-note text.'),
|
|
240
|
+
accountId: z.number().optional().describe('Filter by customer/account/company. Maps to CSFee_TASK_CSAID.'),
|
|
241
|
+
loggedByUserId: z.number().optional().describe('Filter by the contact captured as the task requester/logger.'),
|
|
242
|
+
assignedToUserId: z.number().optional().describe('Filter by the staff contact captured as task assignee.'),
|
|
243
|
+
period: z.string().optional().describe('Exact CSFee_Period value.'),
|
|
244
|
+
actionType: z.string().optional().describe('Exact CSFee_ActionType value.'),
|
|
245
|
+
dateFrom: z.string().optional().describe('Fee start-date range start (inclusive), e.g. 2026-01-01.'),
|
|
246
|
+
dateTo: z.string().optional().describe('Fee start-date range end (inclusive).'),
|
|
247
|
+
page: z.number().optional(),
|
|
248
|
+
pageSize: z.number().optional(),
|
|
249
|
+
}, async (args) => get('/fees/search', args));
|
|
237
250
|
// --- CRM: sales activities / time (read) ---
|
|
238
251
|
strictTool('crm_activity_get', 'Get one CRM sales activity by id (CRMActivity.CRMAID). Returns account, enteredBy, assignedTo, targetContact, type/subType selector labels, due/completed dates, and completed boolean.', { activityId: z.number().describe('CRM activity ID (CRMActivity.CRMAID).') }, async ({ activityId }) => get(`/crm/activities/${activityId}`));
|
|
239
252
|
strictTool('crm_activity_search', 'Search/filter CRM sales activities (CRMActivity). Supports customer/account, assigned-to staff, targeted-at contact, entered-by staff, completed/open state, due-date range, and free text. `completed=true` means CRMADateCompleted is not null; `completed=false` means open.', {
|