@firfi/huly-mcp 0.49.7 → 0.51.0

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 (3) hide show
  1. package/README.md +85 -10
  2. package/dist/index.cjs +24779 -12464
  3. package/package.json +4 -2
package/README.md CHANGED
@@ -340,7 +340,7 @@ When resolved tool exposure is `proxy`, clients see the built-in tools plus thes
340
340
  | `get_tool_schema` | Returns the exact input and output schema for one proxy-visible Huly tool. Use this before invoke_tool when you are not certain about required argument names or result shape. |
341
341
  | `invoke_tool` | Invokes one proxy-visible Huly tool by exact name with its arguments. This tool can call read or write Huly operations; check get_tool_schema and the target tool annotations when safety matters. |
342
342
 
343
- **`TOOLSETS` categories:** `projects`, `issues`, `comments`, `milestones`, `documents`, `storage`, `attachments`, `contacts`, `channels`, `calendar`, `time tracking`, `search`, `associations`, `activity`, `notifications`, `workspace`, `approvals`, `boards`, `cards`, `collaborators`, `custom-fields`, `drive`, `inventory`, `labels`, `leads`, `mail`, `templates`, `model-administration`, `planner`, `preferences`, `processes`, `recruiting`, `sdk-discovery`, `security-administration`, `sequence-administration`, `spaces`, `support`, `tag-categories`, `tags`, `task-management`, `test-management`, `user-statuses`, `views`, `virtual-office`, `workbench`, `workflow-statuses`
343
+ **`TOOLSETS` categories:** `projects`, `issues`, `comments`, `milestones`, `documents`, `storage`, `attachments`, `contacts`, `channels`, `calendar`, `time tracking`, `search`, `associations`, `activity`, `notifications`, `workspace`, `approvals`, `boards`, `cards`, `collaborators`, `custom-fields`, `drive`, `hr`, `inventory`, `labels`, `leads`, `mail`, `templates`, `model-administration`, `planner`, `preferences`, `processes`, `recruiting`, `sdk-discovery`, `security-administration`, `sequence-administration`, `spaces`, `support`, `tag-categories`, `tags`, `task-management`, `test-management`, `user-statuses`, `views`, `virtual-office`, `workbench`, `workflow-statuses`
344
344
 
345
345
  ### Projects
346
346
 
@@ -366,10 +366,10 @@ When resolved tool exposure is `proxy`, clients see the built-in tools plus thes
366
366
  | `update_component` | Update fields on an existing Huly component. Only provided fields are modified. Description supports markdown. Markdown links to current-workspace Huly browse URLs with _class, _id, and label become native Huly references; external URLs and other-workspace browse URLs stay normal links. |
367
367
  | `set_issue_component` | Set or clear the component on a Huly issue. Pass null for component to clear it. |
368
368
  | `delete_component` | Permanently delete a Huly component. This action cannot be undone. |
369
- | `list_issues` | Query Huly issues with optional filters. Returns issues sorted by modification date (newest first). Supports filtering by project, exact workflow status name (status), Huly SDK task.statusCategory key (statusCategory: UnStarted, ToDo, Active, Won, Lost), assignee, creator (raw Person ID, exact email, or exact display name), component, a human-readable attached label title (label, exact and case-insensitive), milestone (project-scoped ID or exact case-insensitive label), milestone presence (hasMilestone), parentIssue (to list children of a specific issue), and isTopLevel (to return only native top-level issues). Creator, label, and milestone filters are applied before the result limit; ambiguous creator display names fail actionably and unknown creators return an empty list. Each result includes creator as a stable Person reference { id, name?, email? } when resolvable and the assigned milestone as { id, label } when resolvable. Supports searching by title substring (titleSearch) and description content (descriptionSearch). Each result includes deterministic label summaries with title and available color; missing labels are an empty array, duplicate titles collapse case-insensitively while preferring a valid color, and unusable partial attachments are omitted with a tool warning. |
369
+ | `list_issues` | Query Huly issues with optional filters. Returns issues sorted by modification date (newest first). Supports filtering by project, exact workflow status name (status), Huly SDK task.statusCategory key (statusCategory: UnStarted, ToDo, Active, Won, Lost), assignee (email, Person display name, or exact agent UserProfile title), creator (raw Person ID, exact email, or exact display name), component, a human-readable attached label title (label, exact and case-insensitive), milestone (project-scoped ID or exact case-insensitive label), milestone presence (hasMilestone), parentIssue (to list children of a specific issue), and isTopLevel (to return only native top-level issues). Creator, label, and milestone filters are applied before the result limit; ambiguous creator display names fail actionably and unknown creators return an empty list. Each result includes creator as a stable Person reference { id, name?, email? } when resolvable and the assigned milestone as { id, label } when resolvable. Supports searching by title substring (titleSearch) and description content (descriptionSearch). Each result includes deterministic label summaries with title and available color; missing labels are an empty array, duplicate titles collapse case-insensitively while preferring a valid color, and unusable partial attachments are omitted with a tool warning. |
370
370
  | `get_issue` | Retrieve full details for a Huly issue including markdown description, its creator as a stable Person reference { id, name?, email? } when resolvable, its assigned milestone as { id, label } when resolvable, and deterministic attached-label summaries with title and available color. Missing labels are an empty array, duplicate titles collapse case-insensitively while preferring a valid color, and unusable partial creator or label metadata is omitted with one bounded tool warning. Use this to view issue content, comments, classification, or full metadata. |
371
- | `create_issue` | Create a new issue in a Huly project. Omit parentIssue for a native top-level issue, or specify parentIssue to create a sub-issue. Optionally set taskType by ID or display name; it is resolved within the target project's project type, and status is validated against that task type's workflow. Use list_task_types or get_project_type to discover valid task types and statuses. Description supports markdown formatting; markdown links to current-workspace Huly browse URLs with _class, _id, and label become native references, while external URLs stay normal links. Returns the created issue identifier. |
372
- | `update_issue` | Update fields on an existing Huly issue. Optionally set taskType by ID or display name; it is resolved within the target project's project type, and the status is preserved only when valid for the new task type. Use list_task_types or get_project_type to discover valid task types and statuses. Only provided fields are modified. Description updates support markdown; markdown links to current-workspace Huly browse URLs with _class, _id, and label become native references, while external URLs stay normal links. |
371
+ | `create_issue` | Create a new issue in a Huly project. Assignee accepts an email, Person display name, or exact agent UserProfile title and always stores the linked Person. Omit parentIssue for a native top-level issue, or specify parentIssue to create a sub-issue. Optionally set taskType by ID or display name; it is resolved within the target project's project type, and status is validated against that task type's workflow. Use list_task_types or get_project_type to discover valid task types and statuses. Description supports markdown formatting; markdown links to current-workspace Huly browse URLs with _class, _id, and label become native references, while external URLs stay normal links. Returns the created issue identifier. |
372
+ | `update_issue` | Update fields on an existing Huly issue. Assignee accepts an email, Person display name, or exact agent UserProfile title and always stores the linked Person; use null to unassign. Optionally set taskType by ID or display name; it is resolved within the target project's project type, and the status is preserved only when valid for the new task type. Use list_task_types or get_project_type to discover valid task types and statuses. Only provided fields are modified. Description updates support markdown; markdown links to current-workspace Huly browse URLs with _class, _id, and label become native references, while external URLs stay normal links. |
373
373
  | `add_issue_label` | Add a tag/label to a Huly issue. Creates the tag if it doesn't exist in the project. |
374
374
  | `remove_issue_label` | Remove a tag/label from a Huly issue. Detaches the label reference; does not delete the label definition. |
375
375
  | `delete_issue` | Permanently delete a Huly issue. This action cannot be undone. |
@@ -466,12 +466,16 @@ When resolved tool exposure is `proxy`, clients see the built-in tools plus thes
466
466
 
467
467
  | Tool | Description |
468
468
  |------|-------------|
469
+ | `list_employees` | List employees (persons who are team members), sorted by modification date (newest first). Each summary exposes stable Contact Employee fields city, email, role, statuses count, personUuid, position, active, and modifiedOn. SDK avatarType/avatar/avatarProps are provider/blob metadata; attachment/comment/channel counters and social identity collections are derived; birthday/profile need separate contracts; createdOn/createdBy/modifiedBy and class/space refs are internal metadata and intentionally unsupported in this projection. |
470
+ | `set_employee_position` | Idempotently set an employee's official position on contact.mixin.Employee. employee must be an object with exactly one locator field: {id}, {email}, or {name}; combined locator modalities are rejected. The selected ID, email, or display name is exact, and duplicate email/name matches are rejected. The position field is required: pass a string to set it, or null/an empty string to clear it. Omitting position fails schema parsing and performs no mutation. This updates the Contact Employee mixin, not an HR Staff record. |
471
+ | `invite_employee` | Create or promote and invite an employee, or resend an inactive employee invitation. mode=create-or-promote requires the exact Huly display name and email; one checked atomic transaction creates or updates the Person, email SocialIdentity, and active Employee before sending. A changed authoritative precondition sends no invite and directs the caller to retry in a fresh session. mode=invite-existing requires an exact email/name locator and rejects active or non-Employee targets. Omitted role preserves the Employee role; an explicit different role is persisted atomically before resend. Returns no invitation link, credential, or token; an invitation-provider failure reports completed preparation. |
472
+ | `list_inactive_employees` | List every inactive Employee before applying output pagination. Each result distinguishes the account link, workspace membership and role, Person identity, and Employee active state so an agent can choose reinvite, deactivate, or kick safely. |
473
+ | `deactivate_employee` | Preview or execute an employee lifecycle change resolved by exact email or exact display name. action=deactivate only sets Employee.active=false and retains workspace membership; action=kick then removes the linked account from the workspace. If workspace removal fails after deactivation, the typed partial failure lists completed changes and directs a safe preview-and-retry. Preview is the default. Execution requires execute=true plus one exact expected relationship object copied from the preview: unlinked, linked-without-membership, or workspace-member. Any changed Person ID, account UUID, Employee active flag, membership, or workspace role is rejected. The authenticated employee cannot target itself. |
469
474
  | `list_persons` | List all persons in the Huly workspace. Returns persons sorted by modification date (newest first). Supports searching by name substring (nameSearch) and email substring (emailSearch). |
470
475
  | `get_person` | Retrieve full details for a person including contact channels. Use personId or email to identify the person. |
471
476
  | `create_person` | Create a new person in Huly. Returns the created person ID. |
472
477
  | `update_person` | Update fields on an existing person. Only provided fields are modified. |
473
478
  | `delete_person` | Permanently delete a person from Huly. This action cannot be undone. |
474
- | `list_employees` | List employees (persons who are team members). Returns employees sorted by modification date (newest first). |
475
479
  | `list_contact_channel_providers` | List supported contact channel provider labels for person and organization channel tools. |
476
480
  | `list_person_channels` | List contact channels for a person. Person accepts person ID, exact email address, or exact Huly display name; ambiguous names fail and should be retried with email or person ID. |
477
481
  | `add_person_channel` | Idempotently add a contact channel to a person. Person accepts person ID, exact email address, or exact Huly display name. Provider labels match list_contact_channel_providers. Returns added=false and the existing channel when the exact provider+value already exists. |
@@ -483,6 +487,7 @@ When resolved tool exposure is `proxy`, clients see the built-in tools plus thes
483
487
  | `update_organization` | Update fields on an existing organization identified by ID or exact name when that name is unique. Only provided fields are modified. Description supports markdown for CRM notes / revenue summaries / context. Markdown links to current-workspace Huly browse URLs with _class, _id, and label become native Huly references; external URLs and other-workspace browse URLs stay normal links. Pass null to clear city or description. If multiple organizations share the same name, use the organization ID. |
484
488
  | `delete_organization` | Permanently delete an organization identified by ID or exact name when that name is unique. Use with care - this cannot be undone. Useful for cleaning up duplicate organizations after merging their data elsewhere. If multiple organizations share the same name, use the organization ID. |
485
489
  | `make_organization_customer` | Apply the Customer mixin to an organization so it appears in the Huly Leads > Customers view. Idempotent - safe to call on organizations that are already customers. Takes the organization ID or exact name when that name is unique. |
490
+ | `make_person_customer` | Apply the native Customer mixin to one existing person so it appears in Huly Leads > Customers. Resolve by person ID, exact email address, or exact display name; ambiguous identifiers fail, no person is created, and repeated calls are idempotent. |
486
491
  | `add_organization_channel` | Idempotently add a contact channel to an organization identified by ID or exact unique name. Provider labels: email, phone, linkedin, twitter, github, facebook, telegram, homepage, whatsapp, skype, profile, viber. Returns added=false and the existing channel when the exact provider+value already exists. |
487
492
  | `list_organization_channels` | List contact channels for an organization identified by ID or exact unique organization name. Returns channelId, provider label, value, and optional activity metadata. |
488
493
  | `update_organization_channel` | Update one contact channel on an organization identified by ID or exact unique name. Identify the channel with exactly one locator: channelId, or provider plus value. Provide newProvider, newValue, or both. Updating to an existing provider+value on the same organization fails with a conflict. |
@@ -491,6 +496,19 @@ When resolved tool exposure is `proxy`, clients see the built-in tools plus thes
491
496
  | `list_organization_members` | List all persons who are members of an organization. Returns each member's person ID, name, and primary email (if any). When using a name instead of an ID, that name must identify exactly one organization. |
492
497
  | `list_person_organizations` | List all organizations that a person is a member of. Provide personId or email. Returns each organization's ID and name. |
493
498
  | `remove_organization_member` | Unlink a person from an organization's members. Reverses add_organization_member. Returns removed: false if the person was not a member. When using an organization name instead of an ID, that name must identify exactly one organization. |
499
+ | `merge_people` | Preview or execute a native-reference-preserving person merge with an explicitly selected source and survivor; source and survivor must each contain exactly one exact locator: {id}, {email}, or {name}; duplicate email/name matches fail as ambiguous. Preview is the default and reports identities, channels, memberships, comments, attachments, every other model-declared Person/Contact/Employee reference, account eligibility, retained scalar fields, and an exact preflight token bound to canonical affected document IDs, write-routing fields, and scalar/array values. Execution requires execute=true plus that current token, rejects any snapshot drift before writing, rewires scalar and array references without dropping other array members, and invokes Huly's global Person merge when applicable. The source workspace Person record is retained because Huly's native merge does not cascade-delete it. |
500
+ | `get_person_administration` | Inspect one person's identity and profile administration surface; person must contain exactly one exact locator: {id}, {email}, or {name}; duplicate email/name matches fail as ambiguous. Returns contact statuses, workspace membership, avatar metadata, birthday, social identities, account profile, channel activity, and an explicit stable-field support ledger. |
501
+ | `list_social_identity_providers` | List SocialIdentity providers installed in this Huly workspace, returning native provider IDs and types. |
502
+ | `repair_person_social_identities` | Apply only Huly's native safe, idempotent SocialIdentity repairs from the authenticated person's authoritative account record: recreate missing active projections, promote verification, reassign an unverified identity after an account merge, and propagate authoritative deletion; person must contain exactly one exact locator: {id}, {email}, or {name}; duplicate email/name matches fail as ambiguous. Another account-linked person, verified cross-person reassignment, arbitrary active type/value/key changes, removal of workspace-only identities, and key collisions return a Huly-specific unsupported reason instead of being overwritten. |
503
+ | `list_person_comments` | List notes/comments genuinely attached to one person, oldest first; person must contain exactly one exact locator: {id}, {email}, or {name}; duplicate email/name matches fail as ambiguous. |
504
+ | `add_person_comment` | Add a markdown note/comment to one person; person must contain exactly one exact locator: {id}, {email}, or {name}; duplicate email/name matches fail as ambiguous. Markdown links to current-workspace Huly browse URLs with _class, _id, and label become native Huly references; external URLs and other-workspace browse URLs stay normal links. |
505
+ | `update_person_comment` | Idempotently update a note/comment belonging to one resolved person; person must contain exactly one exact locator: {id}, {email}, or {name}; duplicate email/name matches fail as ambiguous. Markdown links to current-workspace Huly browse URLs with _class, _id, and label become native Huly references; external URLs and other-workspace browse URLs stay normal links. |
506
+ | `delete_person_comment` | Permanently delete a note/comment only when it belongs to one resolved person; person must contain exactly one exact locator: {id}, {email}, or {name}; duplicate email/name matches fail as ambiguous. |
507
+ | `list_person_attachments` | List attachments genuinely attached to one person; person must contain exactly one exact locator: {id}, {email}, or {name}; duplicate email/name matches fail as ambiguous. |
508
+ | `add_person_attachment` | Upload and attach a file to one person from exactly one of filePath, fileUrl, or base64 data; person must contain exactly one exact locator: {id}, {email}, or {name}; duplicate email/name matches fail as ambiguous. |
509
+ | `get_person_attachment` | Get an attachment only when it belongs to one resolved person; person must contain exactly one exact locator: {id}, {email}, or {name}; duplicate email/name matches fail as ambiguous. |
510
+ | `update_person_attachment` | Update description or pinned state only when the attachment belongs to one resolved person; person must contain exactly one exact locator: {id}, {email}, or {name}; duplicate email/name matches fail as ambiguous. |
511
+ | `delete_person_attachment` | Permanently delete an attachment only when it belongs to one resolved person; person must contain exactly one exact locator: {id}, {email}, or {name}; duplicate email/name matches fail as ambiguous. |
494
512
 
495
513
  ### Channels
496
514
 
@@ -580,9 +598,9 @@ When resolved tool exposure is `proxy`, clients see the built-in tools plus thes
580
598
  | `list_associations` | List Huly association definitions: class-level typed links that define which document classes may be related. Use this before create_relation to discover association IDs, source/target classes, and whether relation writes are supported. |
581
599
  | `create_association` | Idempotently create one Huly association definition between two non-system classes. Use sourceClass/targetClass with sourceRole/targetRole and cardinality; returns an existing identical association by default. |
582
600
  | `delete_association` | Idempotently delete one Huly association definition only when no concrete relations reference it. If relations exist, delete_relation must clean them up first; deleting an already-missing association is a successful no-op. |
583
- | `list_relations` | List concrete Huly relation instances under an association, optionally filtered by source and target documents. Endpoint locators support raw, issue, document, and card. Requires at least one filter to avoid broad workspace scans. |
584
- | `create_relation` | Idempotently create one concrete relation between two resolved documents for a writable association. Endpoint locators support raw, issue, document, and card. Enforces association endpoint classes, direction, duplicate handling, automation-only restrictions, and cardinality. |
585
- | `delete_relation` | Idempotently delete one concrete relation by relation ID or by exact association/source/target triple. Triple endpoint locators support raw, issue, document, and card. Triple deletes use the same direction semantics as create_relation and fail if the selector is ambiguous. |
601
+ | `list_relations` | List concrete Huly relation instances under an association, optionally filtered by source and target documents. Endpoint locators support raw, issue, document, card, and exact funnel-scoped lead targets. Requires at least one filter to avoid broad workspace scans. |
602
+ | `create_relation` | Idempotently create one concrete relation between two resolved documents for a writable association. Endpoint locators support raw, issue, document, card, and exact funnel-scoped lead targets. Enforces association endpoint classes, direction, duplicate handling, automation-only restrictions, and cardinality. Published Relation endpoints have no mutable field; replace a relation with delete_relation then create_relation. |
603
+ | `delete_relation` | Idempotently delete one concrete relation by relation ID or by exact association/source/target triple. Triple endpoint locators support raw, issue, document, card, and exact funnel-scoped lead targets. Triple deletes use the same direction semantics as create_relation and fail if the selector is ambiguous. |
586
604
 
587
605
  ### Activity
588
606
 
@@ -752,6 +770,41 @@ When resolved tool exposure is `proxy`, clients see the built-in tools plus thes
752
770
  | `list_drive_file_versions` | List versions for a Drive file resolved by file id or file path. Marks the current version and includes blob id, size, MIME type, lastModified, and download URL. |
753
771
  | `restore_drive_file_version` | Restore an existing Drive file version by version id or numeric version. Idempotent when the requested version is already current and does not increment the file version counter. |
754
772
 
773
+ ### Hr
774
+
775
+ | Tool | Description |
776
+ |------|-------------|
777
+ | `list_departments` | List HR departments with exact full paths, hierarchy, managers, subscribers, team lead, direct Staff assignments, server-derived member count, and stable counters. Scope by exact parent path/ID; recursive=false returns direct children. |
778
+ | `get_department` | Get one HR department by exact full slash-separated path or department ID. |
779
+ | `create_department` | Create a top-level or nested HR department. Parent and people use exact paths/IDs/names/emails and reject ambiguity. Names cannot contain '/'. Department.members starts empty and remains server-derived. |
780
+ | `update_department` | Rename, move, or replace department metadata and people. Rejects duplicate sibling names, parent cycles, and moves of subtrees with server-derived members; clear Staff.department assignments before moving a populated subtree. newParent=null moves top-level; teamLead=null clears. Never writes Department.members. |
781
+ | `delete_department` | Preview destructive impact by default. Execution requires execute=true plus exact previewed descendant and assigned-Staff counts; Huly then cascades descendant deletion and clears affected Staff assignments. |
782
+ | `list_staff` | List HR Staff and authoritative department assignments. Optionally scope by exact department path/ID, include descendants, and filter Employee active state. |
783
+ | `assign_staff_department` | Assign an exact employee ID/email/display name by writing only authoritative Staff.department. Use department=null to clear. Department.members hierarchy propagation is performed asynchronously by Huly's server trigger. |
784
+ | `list_hr_request_comments` | List comments directly attached to an exact HR request ID, with total and truncation metadata. |
785
+ | `add_hr_request_comment` | Add a Markdown comment directly to an exact HR request ID. |
786
+ | `update_hr_request_comment` | Update a comment that belongs directly to an exact HR request. |
787
+ | `delete_hr_request_comment` | Delete a comment that belongs directly to an exact HR request. |
788
+ | `list_hr_request_attachments` | List files directly attached to an exact HR request ID, with total and truncation metadata. |
789
+ | `get_hr_request_attachment` | Get one file belonging directly to an exact HR request. |
790
+ | `add_hr_request_attachment` | Attach a file to an exact HR request. Provide filename, contentType, and exactly one of filePath, fileUrl, or base64 data. |
791
+ | `update_hr_request_attachment` | Update description and/or pinned state for a file belonging directly to an exact HR request. |
792
+ | `delete_hr_request_attachment` | Delete one file belonging directly to an exact HR request. |
793
+ | `list_hr_request_types` | Discover installed HR request types by stable ID and Huly-translated human label. Set locale to a supported Huly locale such as fr; labels from any supported locale may be used by request tools, while ambiguous labels are rejected. Request-type mutation is intentionally unsupported because Huly installs these as model-space documents and exposes no stable runtime mutation contract. |
794
+ | `list_hr_requests` | List HR requests with exact optional employee, department, and request-type filters. Calendar dates are inclusive YYYY-MM-DD values stored with UTC offset 0. Every match is loaded from Huly before the intentional output page is applied; results include total, truncation, and nextOffset continuation metadata. |
795
+ | `get_hr_request` | Get one HR request by the exact raw request ID returned by list_hr_requests. |
796
+ | `create_hr_request` | Create an employee-attached HR request using exact employee, department, and request-type resolution. Dates are inclusive calendar dates in YYYY-MM-DD form and descriptions accept Markdown with native Huly references. |
797
+ | `update_hr_request` | Update selected HR request fields by exact request ID. Department and type locators resolve exactly; omitted fields are preserved. Dates remain inclusive YYYY-MM-DD calendar dates. |
798
+ | `delete_hr_request` | Delete one exact HR request. Its comments and attachments are Huly-owned attached collections and follow the request deletion lifecycle. |
799
+ | `list_public_holidays` | List public-holiday documents with exact optional department and inclusive date filters. includeInherited adds every ancestor department explicitly; it never adds descendants. Results are loaded completely from Huly before the intentional output page is applied, and include total, truncated, and nextOffset metadata. |
800
+ | `get_public_holiday` | Get one public-holiday document by the exact raw ID returned by list_public_holidays. |
801
+ | `create_public_holiday` | Create one public holiday for an exact department ID or full path. The date is a timezone-independent Gregorian calendar day stored as Huly TzDate with UTC offset 0; duplicate department/date pairs are rejected. |
802
+ | `update_public_holiday` | Update selected fields of one exact public-holiday ID. Department paths resolve exactly and duplicate department/date pairs are rejected. Omitted fields are preserved without a read-after-write query. |
803
+ | `delete_public_holiday` | Permanently delete one public-holiday document by exact raw ID. |
804
+ | `get_hr_schedule` | Return every HR request overlapping an inclusive UTC calendar-date range, every applicable holiday document, and one day cell per date. Department scope includes nested departments by default; holiday inheritance walks upward from each scoped department by default. No result cap is applied and complete=true certifies full cursor pagination. |
805
+ | `get_hr_table` | Return a complete employee table for an inclusive UTC calendar-date range. Base workdays are Monday-Friday minus applicable inherited holiday dates; negative request types consume non-holiday workdays, positive types add calendar-day units, and zero types add none. No result cap is applied. |
806
+ | `get_hr_summary_report` | Return complete request totals grouped by exact department and request type for an inclusive UTC date range. Requests are clipped to the range; calendar days include weekends, workdays exclude weekends and applicable inherited holidays, and signed units follow Huly request-type values. No result cap is applied. |
807
+
755
808
  ### Inventory
756
809
 
757
810
  | Tool | Description |
@@ -800,10 +853,32 @@ When resolved tool exposure is `proxy`, clients see the built-in tools plus thes
800
853
 
801
854
  | Tool | Description |
802
855
  |------|-------------|
856
+ | `list_lead_comments` | List native comments on one lead resolved by exact funnel ID/name and LEAD-<number>. Returns Markdown with native Huly references preserved. |
857
+ | `add_lead_comment` | Add a Markdown comment to one exact lead. Current-workspace Huly links are stored as native references. |
858
+ | `update_lead_comment` | Update one comment belonging to an exact lead; comments attached elsewhere are rejected. Markdown native references are preserved. |
859
+ | `delete_lead_comment` | Delete one comment only when it belongs to the exact lead target. |
860
+ | `list_lead_attachments` | List native attachment references belonging to one exact lead. |
861
+ | `add_lead_attachment` | Upload a local path, URL, or base64 payload and attach the native file reference to one exact lead. |
862
+ | `get_lead_attachment` | Get metadata and a download URL for an attachment only when it belongs to one exact lead. |
863
+ | `update_lead_attachment` | Update description or pinned state for an attachment only when it belongs to one exact lead. |
864
+ | `delete_lead_attachment` | Delete an attachment only when it belongs to one exact lead. The native blob reference remains governed by Huly storage cleanup. |
865
+ | `list_lead_label_definitions` | List reusable native label definitions whose target class is Lead, without raw class IDs. Returns the full matching total and whether the limited page is truncated. |
866
+ | `list_lead_labels` | List native TagReference label relations attached to one exact lead. |
867
+ | `add_lead_label` | Idempotently attach a label relation to one exact lead. Accepts a definition ID or exact title; a missing title creates the Lead label definition. |
868
+ | `update_lead_label` | Update the published optional weight on every matching TagReference relation for one exact lead and label. |
869
+ | `remove_lead_label` | Idempotently remove all matching TagReference relations from one exact lead without deleting the reusable label definition. |
803
870
  | `list_funnels` | List all Huly sales funnels (lead pipelines). Returns each funnel's stable ID and display name, sorted by name. Supports filtering by archived status. |
871
+ | `get_funnel` | Get one funnel by stable _id or exact name. Ambiguous names are rejected. Returns the full stable Funnel/Project projection, validated Lead workflow, content counts, deletion impact, and explicit unsupported-field classifications. |
872
+ | `create_funnel` | Create a native Huly funnel after validating its Funnel project type, Lead task types, workflow statuses, membership, and owners. Full description accepts Markdown and preserves current-workspace native references. Creation is idempotent only for one exact existing name; the result explicitly reports whether that existing funnel is archived, and ambiguous names are rejected. |
873
+ | `update_funnel` | Update a funnel resolved by stable _id or exact unambiguous name. Validates the existing Funnel project type/workflow and membership before mutation. Null clears description or fullDescription; Markdown native references are preserved. |
874
+ | `archive_funnel` | Archive a funnel without deleting it. Returns lead/comment/attachment impact so the caller can assess the hidden native content. Already archived funnels are an idempotent no-op. |
875
+ | `delete_funnel` | Permanently delete an exact funnel only after it is archived and empty. First call get_funnel or archive_funnel, then pass the observed impact counts as expectedLeads, expectedComments, and expectedAttachments. Deletion fails if any count changed after that preflight snapshot. |
804
876
  | `list_leads` | Query Huly leads in a funnel with optional filters. Pass the funnel ID returned by list_funnels, or a funnel name for convenience lookup. Returns leads sorted by modification date (newest first). Supports filtering by status, assignee, and title search. |
805
- | `get_lead` | Retrieve full details for a Huly lead including markdown description, customer name, funnel ID and funnel name, and status. Lead identifiers follow the upstream Huly format like 'LEAD-1'. |
806
- | `create_lead` | Create one native Huly lead in an active funnel for an existing person or organization. Resolve the funnel by ID or exact name; identify the customer explicitly as person or organization; optionally choose an employee assignee, Lead-compatible task type, exact workflow status, and Markdown description. Automatically applies the Customer mixin when needed, preserves native Huly references, and returns both leadId and LEAD-<number>. This tool never creates a person or organization inline. |
877
+ | `get_lead` | Retrieve one exact funnel-scoped Huly lead with Markdown descriptions, customer identity/type, workflow task type and status, rank/completion, native collection counts, actor timestamps, funnel identity, and explicit classifications for fields without stable published semantics. Lead identifiers use LEAD-<number>. |
878
+ | `create_lead` | Create one native Huly lead in an active funnel for an existing person or organization. Resolve the funnel by ID or exact name; identify the customer explicitly as person or organization; optionally choose an employee assignee, a workflow status matched exactly after normalization (trimmed, case-insensitive, and ignoring spaces, hyphens, and underscores), and Markdown description. Automatically applies the Customer mixin when needed, preserves native Huly references, and returns both leadId and LEAD-<number>. This tool never creates a person or organization inline. |
879
+ | `update_lead` | Update a native Huly lead by funnel ID or exact name and LEAD-<number> identifier. Supported fields are title, Markdown description, a workflow status matched exactly after normalization (trimmed, case-insensitive, and ignoring spaces, hyphens, and underscores), employee assignee, start date, due date, and Customer mixin description. Omitted fields are unchanged; pass null explicitly to clear description, assignee, dates, or customer description. Existing people are resolved exactly and ambiguous identifiers fail. |
880
+ | `move_lead` | Move a native Huly lead to another active funnel after validating both native Funnel project types and Lead workflows. Pass a destination status matched exactly after normalization (trimmed, case-insensitive, and ignoring spaces, hyphens, and underscores), or omit status to map the current status name; incompatible or ambiguous mappings fail without writing. |
881
+ | `delete_lead` | Preview native lead deletion impact by default. The preview reads authoritative comment, attachment, and label relation counts. To permanently delete, pass execute=true together with the exact counts returned by the preview; deletion fails if impact changed. |
807
882
 
808
883
  ### Mail
809
884