@prefix sioc: <http://rdfs.org/sioc/ns#> .
@prefix dc: <http://purl.org/dc/elements/1.1/> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix content: <http://purl.org/rss/1.0/modules/content/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .

<https://lhero.org/?post_type=lh-portfolio&#038;p=147131>
  a sioc:Post ;
  dc:title "MCP abilities" ;
  dcterms:identifier 147131 ;
  dc:modified "2026-09-11T16:42:20Z"^^xsd:dateTime ;
  dc:created "2026-09-07T19:13:55Z"^^xsd:dateTime ;
  sioc:link <https://lhero.org/portfolio/lh-tasks/mcp-abilities/> ;
  sioc:has_creator <https://lhero.org/author/1/#account> ;
  sioc:has_container <https://lhero.org/#posts> ;
  content:encoded """<ul class="lh_portfolio-meta"><li><strong>Type:</strong> Doc-section</li><li><strong>Part of:</strong> <a href="https://lhero.org/portfolio/lh-tasks/">LH Tasks</a></li></ul><p>Category: <code>lh-tasks</code>. All abilities require the capability returned by <code>LH_Tasks_task_post_type_class::return_required_capability()</code> (default <code>edit_others_posts</code>) — this applies uniformly regardless of a task&#8217;s <code>assigned_to</code>/<code>assignee</code>; assignment is enforced as an <em>additional</em> identity check inside <code>claim-next-task</code>/<code>complete-task</code>/<code>fail-task</code>/<code>reassign-task</code>/<code>renew-claim</code>, not as a substitute for this capability gate. <code>edit-task</code> is the sole unconditional override.</p>
<ul>
<li><strong><code>lh-tasks/create-task</code></strong> — create a new task. Accepts <code>queue</code> (routing), <code>task_type</code> (classification), <code>post_status</code> (<code>draft</code>|<code>pending</code>|<code>active</code>, default <code>active</code>), and an optional <code>assigned_to</code> (WP user ID) to hard-assign it up front.</li>
<li><strong><code>lh-tasks/claim-next-task</code></strong> — atomically claim the oldest available, unblocked, eligible task in a queue on behalf of the calling account (identity is always the authenticated caller, never input) — or, if <code>task_id</code> is given, claim that specific task instead. Eligible means unassigned or hard-assigned to the caller. Returns a <code>claim_token</code> required by the abilities below that act on a held claim.</li>
<li><strong><code>lh-tasks/complete-task</code></strong> — mark a claimed task Resolved with an optional result payload. Requires the <code>claim_token</code> from <code>claim-next-task</code>; fails if the caller doesn&#8217;t currently hold the claim.</li>
<li><strong><code>lh-tasks/fail-task</code></strong> — mark a task failed; <code>reason_type: retryable</code> (default) requeues or blocks depending on remaining retries, <code>reason_type: needs_human</code> skips retries and hands off via reassignment instead. Requires <code>claim_token</code>.</li>
<li><strong><code>lh-tasks/reassign-task</code></strong> — release the current claim and hand a task off (optionally hard-assigning it to a specific account), logging a note on what&#8217;s done and what&#8217;s left. Requires <code>claim_token</code> — this is a self-service action for whoever currently holds the claim.</li>
<li><strong><code>lh-tasks/renew-claim</code></strong> — heartbeat for a long-running claimed task: pushes <code>claimed_at</code> forward to now, without changing status or assignee, so the task stays ahead of the stale-claim sweep (default 10 minute cutoff) instead of risking auto-release mid-work. Requires <code>claim_token</code>. Optionally accepts a <code>note</code>, logged to <code>progress_log</code> (event <code>heartbeat</code>) the same way <code>reassign-task</code> logs its note — letting a heartbeat double as a lightweight progress trail. Added 1.7.0.</li>
<li><strong><code>lh-tasks/edit-task</code></strong> — unconditional, <code>edit_others_posts</code>-gated queue-management override: set/clear <code>assigned_to</code>, release a stuck claim, and/or change status/queue, without needing to hold the current claim.</li>
<li><strong><code>lh-tasks/get-task</code></strong> — retrieve a single task by ID.</li>
<li><strong><code>lh-tasks/list-tasks</code></strong> — paginated, filterable list (status, queue, task_type, assignee, assigned_to).</li>
</ul>
"""^^rdf:XMLLiteral ;
  sioc:content """Type: Doc-sectionPart of: LH TasksCategory: lh-tasks. All abilities require the capability returned by LH_Tasks_task_post_type_class::return_required_capability() (default edit_others_posts) — this applies uniformly regardless of a task&#8217;s assigned_to/assignee; assignment is enforced as an additional identity check inside claim-next-task/complete-task/fail-task/reassign-task/renew-claim, not as a substitute for this capability gate. edit-task is the sole unconditional override.

lh-tasks/create-task — create a new task. Accepts queue (routing), task_type (classification), post_status (draft|pending|active, default active), and an optional assigned_to (WP user ID) to hard-assign it up front.
lh-tasks/claim-next-task — atomically claim the oldest available, unblocked, eligible task in a queue on behalf of the calling account (identity is always the authenticated caller, never input) — or, if task_id is given, claim that specific task instead. Eligible means unassigned or hard-assigned to the caller. Returns a claim_token required by the abilities below that act on a held claim.
lh-tasks/complete-task — mark a claimed task Resolved with an optional result payload. Requires the claim_token from claim-next-task; fails if the caller doesn&#8217;t currently hold the claim.
lh-tasks/fail-task — mark a task failed; reason_type: retryable (default) requeues or blocks depending on remaining retries, reason_type: needs_human skips retries and hands off via reassignment instead. Requires claim_token.
lh-tasks/reassign-task — release the current claim and hand a task off (optionally hard-assigning it to a specific account), logging a note on what&#8217;s done and what&#8217;s left. Requires claim_token — this is a self-service action for whoever currently holds the claim.
lh-tasks/renew-claim — heartbeat for a long-running claimed task: pushes claimed_at forward to now, without changing status or assignee, so the task stays ahead of the stale-claim sweep (default 10 minute cutoff) instead of risking auto-release mid-work. Requires claim_token. Optionally accepts a note, logged to progress_log (event heartbeat) the same way reassign-task logs its note — letting a heartbeat double as a lightweight progress trail. Added 1.7.0.
lh-tasks/edit-task — unconditional, edit_others_posts-gated queue-management override: set/clear assigned_to, release a stuck claim, and/or change status/queue, without needing to hold the current claim.
lh-tasks/get-task — retrieve a single task by ID.
lh-tasks/list-tasks — paginated, filterable list (status, queue, task_type, assignee, assigned_to).

""" ;
  sioc:topic <https://lhero.org/lh_portfolio-type/doc-section/>, <https://lhero.org/?taxonomy=author&term=cap-1> .

<https://lhero.org/author/1/#account> rdfs:seeAlso <https://lhero.org/author/1/?feed=lhrdf&format=turtle> .
<https://lhero.org/lh_portfolio-type/doc-section/> rdfs:seeAlso <https://lhero.org/lh_portfolio-type/doc-section/?feed=lhrdf&format=turtle> .
<https://lhero.org/?taxonomy=author&term=cap-1> rdfs:seeAlso <https://lhero.org/?taxonomy=author&term=cap-1&feed=lhrdf&format=turtle> .
