ديـرDeerالدليلDocs

أدوات MCP

مرجع لكل أداة يتيحها خادم MCP في دير، بمدخلاتها وصلاحيتها وخطورتها، وطريقة إعادة المحاولة بعد الموافقة على حذف مهمة.

كيف تعمل الأدوات

كل أداة في MCP إجراء من إجراءات دير، واسمها هو معرّف الإجراء نفسه، مثل tasks.create. ويُولَّد مخطط المدخلات الذي يتسلمه العميل من التعريف الذي تستخدمه الواجهة، فيملأ النموذج الحقول نفسها التي يملؤها الشخص.

لا يعيد tools/list إلا الأدوات المسموحة للاتصال في هذه اللحظة. وتظهر الأداة إذا سمح بها أمران معاً:

  • صلاحية الاتصال: tasks:read أو tasks:write.
  • الصلاحيات الحالية للشخص الذي أنشأ الاتصال.

وتحمل كل أداة تعليقات MCP القياسية: قيمة readOnlyHint هي true في tasks.list، وقيمة destructiveHint هي true في tasks.delete، أما openWorldHint فقيمتها false في الأدوات كلها لأنها لا تتعامل إلا مع مساحة عملك.

ملخص الأدوات

الأداةما تفعلهالصلاحيةالخطورةالموافقة
tasks.listتعرض المهام، مع تصفية حسب المسؤول أو الفريق أو الحالة أو التأخر.tasks:readقراءةلا
tasks.createتنشئ مهمة.tasks:writeتعديللا
tasks.updateتعدّل مهمة قائمة.tasks:writeتعديللا
tasks.set_statusتغيّر حالة مهمة.tasks:writeتعديللا
tasks.assignتحدد المسؤولين عن مهمة.tasks:writeتعديللا
tasks.add_commentتضيف تعليقاً على مهمة.tasks:writeتعديللا
tasks.set_subtaskتحدد مهمة فرعية منجزة أو غير منجزة.tasks:writeتعديللا
tasks.deleteتنقل مهمة إلى سلة المحذوفات.tasks:writeحذفدائماً

يرى الاتصال الذي صلاحيته قراءة الأداة tasks.list وحدها، أما قراءة وكتابة فتشمل الأدوات الثماني كلها.

المعرّفات

تشير الأدوات إلى السجلات بمعرّفها الداخلي، لا بالرمز الذي يظهر في الواجهة:

  • task هو قيمة id للمهمة كما يعيدها tasks.list، وليس رمزها مثل APP-145.
  • project معرّف فريق، وتتضمن المهام التي يعيدها tasks.list الحقل projectId.
  • assignee وعناصر assignees معرّفات أشخاص، وتتضمن المهام الحقلين assigneeId وassigneeIds.

لا توجد بعد أداة للبحث عن الأشخاص أو الفرق بالاسم، فاستخدم المعرّفات التي تأتي مع المهام القائمة.

مرجع الأدوات

tasks.list

كل الحقول اختيارية. وإذا لم ترسل أي مدخلات، أعادت الأداة كل المهام التي تستطيع رؤيتها.

الحقلالنوعملاحظات
assigneestringمعرّف شخص.
projectstringمعرّف فريق.
statusstringbacklog أو todo أو in-progress أو in-review أو done.
overduebooleantrue للمهام المفتوحة التي فات موعد استحقاقها.

تحمل كل مهمة في النتيجة الحقول id وkey وtitle وstatus وpriority وdue وprojectId وassigneeId وassigneeIds.

tasks.create

الحقلالنوعملاحظات
titlestringمطلوب، من حرف واحد إلى 1000 حرف.
descriptionstringحتى 20,000 حرف.
projectstringمعرّف فريق، ويجب ألا يكون الفريق مؤرشفاً.
assigneestringمعرّف شخص واحد.
assigneesstringمصفوفة JSON بمعرّفات الأشخاص، تُرسل نصاً: "[\"<person-id>\"]".
prioritystringurgent أو high أو medium أو low، والافتراضي medium.
statusstringالقيم نفسها في tasks.list، والافتراضي todo.
duestringتاريخ بصيغة YYYY-MM-DD.
repeatstringnone أو daily أو weekdays أو weekly أو monthly.
blockedByarrayحتى 20 معرّف مهمة تعيق هذه المهمة.

تتضمن النتيجة entity وفيه id المهمة الجديدة.

tasks.update

الحقل task مطلوب، وبقية حقول tasks.create اختيارية ولا يتغير إلا ما ترسله. إذا أرسلت project فارغاً خرجت المهمة من فريقها، وإذا أرسلت due فارغاً حُذف التاريخ. وفيها حقلان إضافيان:

الحقلالنوعملاحظات
labelsstringمصفوفة JSON بما لا يزيد على 25 تصنيفاً، كل منها { "ar": "...", "en": "..." }.
commentChannelsstringمصفوفة JSON بمعرّفات القنوات المرتبطة التي تُنسخ إليها التعليقات. القيمة "[]" تُبقي التعليقات في المهمة وحدها، و"null" تستخدم كل القنوات المرتبطة المؤهلة.

لا يجوز أن تشكّل المهام المعيقة حلقة. وإذا حددت مهمة متكررة بالحالة done أُنشئ موعدها التالي مرة واحدة.

tasks.set_status

الحقلالنوعملاحظات
taskstringمطلوب.
statusstringمطلوب: backlog أو todo أو in-progress أو in-review أو done.

tasks.assign

الحقلالنوعملاحظات
taskstringمطلوب.
assigneestringمعرّف شخص واحد.
assigneesstringمصفوفة JSON بمعرّفات الأشخاص تُرسل نصاً، والقيمة "[]" تزيل الجميع.

أرسل assignee أو assignees. ويجب أن يكون كل شخص عضواً في مساحة العمل.

tasks.add_comment

الحقلالنوعملاحظات
taskstringمطلوب.
textstringحتى 20,000 حرف.
uploadsarrayعناصر بالشكل { "name", "mime", "content" }، ومحتوى content بترميز base64.

أرسل text أو uploads أو كليهما. يقبل التعليق حتى خمس صور PNG أو JPEG أو WebP أو GIF وتسجيلاً صوتياً واحداً WebM أو MP4 أو Ogg، بإجمالي يصل إلى 10 MiB. إذا كنت تتصل عبر mcp-remote كما في إعداد Claude Desktop، اجعل إجمالي المرفقات أقل من نحو 7.5 MiB لتتسع لترميز base64 وبقية الطلب. وإذا كان لفريق المهمة قنوات مرتبطة مختارة للتعليقات وكنت تستطيع النشر فيها، ينسخ دير التعليق إليها.

tasks.set_subtask

الحقلالنوعملاحظات
taskstringمطلوب.
indexintegerمطلوب: ترتيب المهمة الفرعية بدءاً من 0.
donebooleanمطلوب.

tasks.delete

الحقلالنوعملاحظات
taskstringمطلوب.
_moeen_approvalstringرقم الموافقة، ولا يُرسل إلا عند إعادة المحاولة بعد الموافقة.

تنتقل المهمة إلى سلة المحذوفات 30 يوماً، ويستطيع أي شخص مخوّل استعادتها من دير. ولا يحذف الاستدعاء الأول شيئاً أبداً، بل ينشئ طلب موافقة.

النتائـج

تحمل نتيجة كل tools/call عنصر محتوى واحداً من نوع text فيه كائن JSON، وتكون قيمة isError هي true إذا لم ينجح الإجراء.

JSON
{
  "jsonrpc": "2.0",
  "id": 3,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "{\"ok\":true,\"message\":{\"ar\":\"حُفظ التغيير.\",\"en\":\"Change saved.\"},\"entity\":{\"kind\":\"task\",\"id\":\"<task-id>\",\"label\":{\"ar\":\"Draft the launch email\",\"en\":\"Draft the launch email\"},\"href\":\"/tasks?open=<task-id>\"},\"data\":{\"entity\":{\"kind\":\"task\",\"id\":\"<task-id>\",\"label\":{\"ar\":\"Draft the launch email\",\"en\":\"Draft the launch email\"},\"href\":\"/tasks?open=<task-id>\"}}}"
      }
    ],
    "isError": false
  }
}

يأتي message دائماً بالعربية والإنجليزية. وإذا فشل الاستدعاء حمل الكائن رمز خطأ ثابتاً في code. راجع الأخطاء والموافقات.

أعد محاولة تعديل دون تكـراره

بعض أدوات التعديل التي تعمل دون موافقة تقبل الوسيط الاختياري _moeen_idempotency_key. تحقّق من وسائط الأداة في tools/list. أرسل قيمة فريدة لكل تعديل مقصود، مثل UUID، من 1 إلى 128 حرفاً ظاهراً من ASCII.

إذا انقطع الاتصال، أعد الاستدعاء بالمفتاح والمدخلات نفسيهما ومن اتصال MCP نفسه خلال 24 ساعة. يعيد دير النتيجة الأولى دون إعادة تنفيذ التعديل. إذا استخدمت المفتاح نفسه بمدخلات مختلفة، يعيد IDEMPOTENCY_CONFLICT. ولا تستخدمه مع tasks.delete، فله رقم موافقة يُستخدم مرة واحدة.

خطوات الموافقـة

tasks.delete هي الأداة الوحيدة في MCP التي تحتاج إلى موافقة شخص، ومن يوافق هو الشخص الذي أنشأ الاتصال.

  1. يطلب العميل

    يستدعي العميل tasks.delete ومعه معرّف المهمة.

  2. يسجّل دير الطلب

    لا يحذف دير شيئاً، بل يعيد isError: true مع الرمز MCP_APPROVAL_REQUIRED ورقم الموافقة في approvalId، ويسجّل المحاولة في سجل التدقيق بانتظار موافقة.

  3. يقرر صاحب الاتصال

    يفتح صاحب الاتصال الإعدادات ثم MCP، ويجد الطلب تحت طلبات الموافقة، فيختار السماح بالحذف أو رفض.

  4. يعيد العميل المحاولة

    بعد الموافقة يستدعي العميل tasks.delete مرة أخرى بالمدخلات نفسها تماماً، ويضيف إليها _moeen_approval وقيمته رقم الموافقة. فيحذف دير المهمة ويُعلِّم الموافقة مستخدَمة.

الاستدعاء الأول ورده:

JSON
{"jsonrpc":"2.0","id":7,"method":"tools/call","params":{"name":"tasks.delete","arguments":{"task":"<task-id>"}}}
JSON
{"jsonrpc":"2.0","id":7,"result":{"content":[{"type":"text","text":"{\"ok\":false,\"message\":{\"ar\":\"ينتظر الإجراء موافقتك داخل دير.\",\"en\":\"The action is waiting for approval in Deer.\"},\"data\":{\"code\":\"MCP_APPROVAL_REQUIRED\",\"approvalId\":\"<approval-id>\"}}"}],"isError":true}}

إعادة المحاولة بعد الموافقة وردها:

JSON
{"jsonrpc":"2.0","id":8,"method":"tools/call","params":{"name":"tasks.delete","arguments":{"task":"<task-id>","_moeen_approval":"<approval-id>"}}}
JSON
{"jsonrpc":"2.0","id":8,"result":{"content":[{"type":"text","text":"{\"ok\":true,\"message\":{\"ar\":\"حُفظ التغيير.\",\"en\":\"Change saved.\"},\"data\":{}}"}],"isError":false}}

قواعد الموافقـة

  • للطلب نفسه فقط. تغطي الموافقة هذه الأداة بهذه المدخلات تحديداً، والمهمة كما كانت. فإذا تغيّرت المهمة قبل القرار، لا يستطيع دير الموافقة على الطلب القديم، فاطلب من جديد.
  • خمس عشرة دقيقة. تنتهي صلاحية الطلب بعد 15 دقيقة من الاستدعاء الأول، سواء وُوفق عليه أم لا.
  • استخدام واحد. يعمل رقم الموافقة مرة واحدة، وتُرفض أي إعادة ثانية به.
  • الطلبات المكررة تُدمج. إذا استدعيت الأداة بالمدخلات نفسها والطلب ما زال مفتوحاً، تتسلم approvalId نفسه دون إنشاء طلب جديد.
  • حتى 20 طلباً مفتوحاً لكل اتصال. وبعدها تعيد الاستدعاءات MCP_TOO_MANY_APPROVALS حتى يُبتّ في الطلبات أو تنتهي صلاحيتها.
  • المرفوض والمنتهي. تعيد المحاولة برقمه MCP_APPROVAL_REQUIRED. استدعِ الأداة مجدداً دون _moeen_approval لإنشاء طلب جديد.
  • حيث يلزم فقط. إرسال _moeen_approval إلى أي أداة أخرى يعيد خطأ JSON-RPC بالرسالة Invalid approval ID.
  • الإلغاء يمحو الطلبات. إلغاء الاتصال يحذف طلباته المفتوحة.

MCP tools

Reference for every tool Deer's MCP server exposes, with inputs, required scope and risk, and the approval retry for task deletion.

How tools work

Each MCP tool is a Deer action, and the tool name is the action id, for example tasks.create. The input schema the client receives is generated from the same definition the interface uses, so a model fills in the same fields a person does.

tools/list returns only the tools the connection may use right now. A tool appears when both of these allow it:

  • the connection's scope: tasks:read or tasks:write, and
  • the current permissions of the person who created the connection.

Each tool also carries standard MCP annotations: readOnlyHint is true for tasks.list, destructiveHint is true for tasks.delete, and openWorldHint is false for all of them because they only touch your workspace.

Tool summary

ToolWhat it doesScopeRiskApproval
tasks.listLists tasks, filtered by assignee, team, status or overdue state.tasks:readReadNo
tasks.createCreates a task.tasks:writeWriteNo
tasks.updateEdits an existing task.tasks:writeWriteNo
tasks.set_statusChanges a task's status.tasks:writeWriteNo
tasks.assignSets the people assigned to a task.tasks:writeWriteNo
tasks.add_commentAdds a comment to a task.tasks:writeWriteNo
tasks.set_subtaskChecks or unchecks a subtask.tasks:writeWriteNo
tasks.deleteMoves a task to trash.tasks:writeDestructiveAlways

A connection with Read access sees tasks.list only. Read & write includes all eight.

Identifiers

Tools refer to records by their internal id, not by their display key:

  • task is the task's id from tasks.list, not its key such as APP-145.
  • project is a team id. Tasks returned by tasks.list include projectId.
  • assignee and the entries of assignees are person ids. Tasks include assigneeId and assigneeIds.

There is no tool for looking up people or teams by name yet. Use the ids returned with existing tasks.

Tool reference

tasks.list

All fields are optional. With no input, the tool returns every task you can see.

FieldTypeNotes
assigneestringPerson id.
projectstringTeam id.
statusstringbacklog, todo, in-progress, in-review or done.
overduebooleantrue for open tasks past their due date.

Each task in the result has id, key, title, status, priority, due, projectId, assigneeId and assigneeIds.

tasks.create

FieldTypeNotes
titlestringRequired. 1 to 1000 characters.
descriptionstringUp to 20,000 characters.
projectstringTeam id. The team must not be archived.
assigneestringOne person id.
assigneesstringA JSON array of person ids, sent as a string: "[\"<person-id>\"]".
prioritystringurgent, high, medium or low. Default medium.
statusstringSame values as tasks.list. Default todo.
duestringA date, YYYY-MM-DD.
repeatstringnone, daily, weekdays, weekly or monthly.
blockedByarrayUp to 20 task ids that block this task.

The result includes entity with the new task's id.

tasks.update

task is required. Every other field from tasks.create is optional and changes only what you send. An empty project removes the task from its team, and an empty due clears the date. Two extra fields:

FieldTypeNotes
labelsstringA JSON array of up to 25 labels, each { "ar": "...", "en": "..." }.
commentChannelsstringA JSON array of linked channel ids for comment mirroring. "[]" keeps comments on the task only, "null" uses all eligible linked channels.

Blockers cannot form a cycle. Marking a repeating task done creates its next occurrence once.

tasks.set_status

FieldTypeNotes
taskstringRequired.
statusstringRequired. backlog, todo, in-progress, in-review or done.

tasks.assign

FieldTypeNotes
taskstringRequired.
assigneestringOne person id.
assigneesstringA JSON array of person ids as a string. "[]" removes everyone.

Send assignee or assignees. Each person must be a member of the workspace.

tasks.add_comment

FieldTypeNotes
taskstringRequired.
textstringUp to 20,000 characters.
uploadsarrayItems of { "name", "mime", "content" }, with base64 content.

Send text, uploads or both. A comment can include up to five PNG, JPEG, WebP or GIF images and one WebM, MP4 or Ogg audio recording, up to 10 MiB combined. With mcp-remote, as in the Claude Desktop setup, keep total attachments under about 7.5 MiB to allow for base64 and the rest of the message. If the task team has linked comment channels and you can post in them, Deer mirrors the comment there.

tasks.set_subtask

FieldTypeNotes
taskstringRequired.
indexintegerRequired. The subtask position, starting at 0.
donebooleanRequired.

tasks.delete

FieldTypeNotes
taskstringRequired.
_moeen_approvalstringThe approval id, sent only when you retry after approval.

The task moves to trash for 30 days, where a person with access to it can restore it in Deer. The first call never deletes: it creates an approval request.

Results

Every tools/call result has one text content item that holds a JSON object, and isError is true when the action did not succeed.

JSON
{
  "jsonrpc": "2.0",
  "id": 3,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "{\"ok\":true,\"message\":{\"ar\":\"حُفظ التغيير.\",\"en\":\"Change saved.\"},\"entity\":{\"kind\":\"task\",\"id\":\"<task-id>\",\"label\":{\"ar\":\"Draft the launch email\",\"en\":\"Draft the launch email\"},\"href\":\"/tasks?open=<task-id>\"},\"data\":{\"entity\":{\"kind\":\"task\",\"id\":\"<task-id>\",\"label\":{\"ar\":\"Draft the launch email\",\"en\":\"Draft the launch email\"},\"href\":\"/tasks?open=<task-id>\"}}}"
      }
    ],
    "isError": false
  }
}

message is always given in Arabic and English. When a call fails, the object carries a stable code instead. See Errors and approvals.

Retry a write without duplicating it

Some write tools that run without approval accept the optional _moeen_idempotency_key argument. Check the tool schema in tools/list. Use a unique value per intended change, such as a UUID, with 1 to 128 visible ASCII characters.

After a timeout, repeat the same call with the same key and arguments from the same MCP connection within 24 hours. Deer returns the first result without repeating the change. Reusing a key with different arguments returns IDEMPOTENCY_CONFLICT. tasks.delete uses a single-use approval ID instead.

Approval flow

tasks.delete is the only MCP tool that needs a person's approval. The person who approves is the one who created the connection.

  1. The client asks

    The client calls tasks.delete with the task id.

  2. Deer records a request

    Deer does not delete anything. It returns isError: true with the code MCP_APPROVAL_REQUIRED and an approvalId, and records the attempt as pending approval in the audit log.

  3. The owner decides

    The connection owner opens Settings, then MCP, and finds the request under Approval requests. They select Approve deletion or Reject.

  4. The client retries

    After approval, the client calls tasks.delete again with exactly the same arguments, plus _moeen_approval set to the approval id. Deer deletes the task and marks the approval as used.

The first call and its response:

JSON
{"jsonrpc":"2.0","id":7,"method":"tools/call","params":{"name":"tasks.delete","arguments":{"task":"<task-id>"}}}
JSON
{"jsonrpc":"2.0","id":7,"result":{"content":[{"type":"text","text":"{\"ok\":false,\"message\":{\"ar\":\"ينتظر الإجراء موافقتك داخل دير.\",\"en\":\"The action is waiting for approval in Deer.\"},\"data\":{\"code\":\"MCP_APPROVAL_REQUIRED\",\"approvalId\":\"<approval-id>\"}}"}],"isError":true}}

The retry after approval and its response:

JSON
{"jsonrpc":"2.0","id":8,"method":"tools/call","params":{"name":"tasks.delete","arguments":{"task":"<task-id>","_moeen_approval":"<approval-id>"}}}
JSON
{"jsonrpc":"2.0","id":8,"result":{"content":[{"type":"text","text":"{\"ok\":true,\"message\":{\"ar\":\"حُفظ التغيير.\",\"en\":\"Change saved.\"},\"data\":{}}"}],"isError":false}}

Approval rules

  • Same request only. The approval covers that tool, those exact arguments and the task as it was. If the task changes before the decision, Deer cannot approve the stale request; ask again.
  • Fifteen minutes. A request expires 15 minutes after the first call, approved or not.
  • One use. An approval id works once. A second retry with the same id is refused.
  • Repeats are merged. Calling again with the same arguments while a request is open returns the same approvalId, and no new request is created.
  • Up to 20 open requests per connection. Beyond that, calls return MCP_TOO_MANY_APPROVALS until requests are decided or expire.
  • Rejected or expired. A retry with the id returns MCP_APPROVAL_REQUIRED. Call again without _moeen_approval to create a new request.
  • Only where needed. Sending _moeen_approval to any other tool returns the JSON-RPC error Invalid approval ID.
  • Revocation clears. Revoking a connection deletes its open requests.