KasarKasar Docs
MCP Server

Tools — Tasks & Notes

MCP tools for managing tasks, tracking completion stats, and taking notes linked to CRM records.

Three tools for task lifecycle management, quick statistics, and note-taking with visibility control. All tools operate through the MCP connection configured in Setup.

crm_manage_tasks

Full task lifecycle: list, create, update, complete, and delete tasks. Tasks can be linked to any CRM record (contacts, companies, opportunities) and assigned to workspace users. Use kasar://users to resolve user IDs for assignment.

Parameters

ParameterTypeRequiredDescription
actionenumYeslist, create, update, complete, delete
modeenumNoList preset filter: all (default), today, overdue, upcoming, completed
assigned_tostringNoFilter by assignee UUID (list only)
linked_entity_idstringNoFilter tasks linked to a specific entity (list only)
linked_entity_typestringNoEntity type for the link filter, e.g. contacts, companies, opportunities (list only)
priority_filterenumNoFilter by priority: low, medium, urgent (list only)
action_typestringNoFilter or set action type: call, email, meeting, linkedin_message, whatsapp_message
filtersstringNoJSON-encoded FilterGroup for advanced filtering (list only)
sortstringNoJSON array for multi-field sorting, e.g. [{"field":"due_date","direction":"asc"}]
sort_byenumNoSingle field to sort by: due_date (default), priority, created_at, title (ignored when sort is valid JSON)
sort_direnumNoSort direction: asc (default) or desc
cursorstringNoPagination cursor from a previous response
limitnumberNoResults per page (default 20, max 100)
task_idstringNoRequired for update, complete, and delete actions
titlestringNoRequired for create
due_datestringNoDue date, ISO 8601
priorityenumNolow, medium, urgent (create/update)
assigned_to_idstringNoUUID of the workspace user to assign
linked_entitiesarrayNoCreate/update: array of { id, type } objects for multi-target M2M linking. type is contacts, companies, or opportunities
completedbooleanNoFor the complete action: defaults to true, pass false to reopen

The only valid priority values are low, medium, and urgent. There is no high priority.

Side Effects

  • Create with assignee: sends a task_assigned notification to the assigned user (unless the creator is the assignee).
  • Update with a new assigned_to_id: notifies the new assignee with a task_assigned notification (unless they are the caller).
  • Complete: sets completed_at to the current timestamp and completed_by to the authenticated user. Sends a task_completed notification to whoever assigned/created the task (unless that is the caller).
  • Reopen (completed: false): clears completed_at and completed_by.

All writes are RBAC-aware: a task you are not permitted to modify is rejected.

List Mode Presets

ModeDescription
allAll tasks regardless of status or date (default)
todayIncomplete tasks due today
overdueIncomplete tasks past their due date
upcomingIncomplete tasks due in the future
completedOnly completed tasks

Examples

Create a call task linked to a contact:

{
  "action": "create",
  "title": "Call Alice about contract renewal",
  "due_date": "2025-03-15T09:00:00Z",
  "priority": "urgent",
  "action_type": "call",
  "assigned_to_id": "550e8400-e29b-41d4-a716-446655440000",
  "linked_entities": [
    { "id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "contacts" }
  ]
}

List overdue urgent tasks:

{
  "action": "list",
  "mode": "overdue",
  "priority_filter": "urgent"
}

Complete a task:

{
  "action": "complete",
  "task_id": "7a1b2c3d-4e5f-6789-abcd-ef0123456789"
}

The response confirms the action and triggers a task_completed notification:

{
  "task_id": "7a1b2c3d-4e5f-6789-abcd-ef0123456789",
  "action": "completed"
}

crm_task_stats

Pre-computed multi-metric task snapshot in a single call: total, completed today, remaining today, overdue, this week, and completion rate. Returns no records — for the task list itself (or a simple filtered count) use crm_manage_tasks with action: "list". Each metric is a RBAC-aware SQL COUNT, so the numbers respect the caller's visibility.

Parameters

ParameterTypeRequiredDescription
user_idstringNoFilter stats to a specific user (must be a valid UUID). When omitted, returns stats across all users.

Response

{
  "total": 48,
  "completedToday": 3,
  "remainingToday": 5,
  "overdue": 2,
  "thisWeek": 12,
  "completionRate": 72
}
FieldDescription
totalTotal number of tasks across all statuses
completedTodayTasks whose completed_at is today
remainingTodayIncomplete tasks due today
overdueIncomplete tasks past their due date
thisWeekIncomplete tasks due in the current Monday–Sunday window
completionRatePercentage of completed tasks (0–100, rounded integer)

crm_manage_notes

Full note management: list, get one, create, update, and delete notes with visibility control and entity linking. Notes support HTML content and can be linked to multiple CRM records simultaneously.

Parameters

ParameterTypeRequiredDescription
actionenumYeslist, get, create, update, delete
entity_typestringNoFilter (list) or link (create): entity type, e.g. contacts, companies
entity_idstringNoFilter (list) or link (create): entity UUID
sort_byenumNoSort field: created_at (default), updated_at, title (list only)
sort_direnumNoSort direction: asc or desc (default) (list only)
cursorstringNoPagination cursor from a previous response
limitnumberNoResults per page (default 20, max 100)
note_idstringNoRequired for get, update, and delete actions
contentstringNoNote content, text or HTML. Required for create
visibilityenumNoworkspace or private. Optional on update (omitting keeps the current value); on create, omitting it defaults to private
linked_entitiesarrayNoArray of { id, type } objects for multi-entity M2M linking (contacts, companies, opportunities)
mentioned_user_idsstring[]NoUser UUIDs to notify as @mentions

Behaviors

  • Title generation: a title is automatically extracted from the content. No need to provide one.
  • @mentions are explicit: mentions are not parsed from the content. To trigger a mention_in_note notification, pass the user UUIDs in mentioned_user_ids.
  • Visibility enforcement: notes with visibility: "private" are only visible to their creator. For any other user, list, get, and update behave as if the note does not exist. A get of a note the caller cannot see returns a RECORD_NOT_FOUND error rather than leaking its existence.
  • get returns a single note (RBAC + visibility enforced), enriched with a created_by_display object.

M2M Entity Linking

Notes can be linked to multiple CRM records at once using linked_entities.

  • On create with entity_type + entity_id: creates a single link to the specified record.
  • On create with linked_entities: creates links to all specified records (combined with the single-entity form if both are provided).
  • On update with linked_entities: replaces all existing links with the new set (sync mode). Omitting linked_entities on update leaves the existing links untouched.

Passing linked_entities on update replaces all existing entity links. Include any links you want to keep alongside the new ones. Omit the field entirely to leave links unchanged.

Examples

Create a note on a company:

{
  "action": "create",
  "content": "<p>Met with the CEO. They are interested in the enterprise plan and want a demo next week.</p>",
  "visibility": "workspace",
  "entity_type": "companies",
  "entity_id": "b2c3d4e5-f6a7-8901-bcde-f01234567890"
}

Create a private note and notify a teammate:

{
  "action": "create",
  "content": "<p>Heads up: this account is sensitive, keep internal.</p>",
  "visibility": "private",
  "mentioned_user_ids": ["550e8400-e29b-41d4-a716-446655440000"]
}

Get a single note:

{
  "action": "get",
  "note_id": "c3d4e5f6-a7b8-9012-cdef-012345678901"
}

List notes for a contact:

{
  "action": "list",
  "entity_type": "contacts",
  "entity_id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789"
}

Update a note's content while keeping its visibility:

{
  "action": "update",
  "note_id": "c3d4e5f6-a7b8-9012-cdef-012345678901",
  "content": "<p>Updated: demo confirmed for Thursday 2pm.</p>",
  "linked_entities": [
    { "id": "b2c3d4e5-f6a7-8901-bcde-f01234567890", "type": "companies" },
    { "id": "d4e5f6a7-b8c9-0123-efab-234567890123", "type": "opportunities" }
  ]
}

On this page