Skip to main content
Glama

Delete share

nextcloud_delete_share
DestructiveIdempotent

Revoke a Nextcloud file share by share ID to remove recipient access. Use this to clean up or disable sharing links and permissions.

Instructions

Revoke one share.

DELETE /ocs/v2.php/apps/files_sharing/api/v1/shares/{share_id}

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "share_id": "<share_id>"
    },
    "name": "nextcloud_delete_share"
  }
}

Input Schema

NameRequiredDescriptionDefault
confirmNoExplicitly confirm this destructive operation. Needed only when the client cannot answer a confirmation prompt.
share_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.4.2
    • addedInput schema / properties / confirm
      Added value: +{
      +  "default": false,
      +  "description": "Explicitly confirm this destructive operation. Needed only when the client cannot answer a confirmation prompt.",
      +  "type": "boolean"
      +}
  2. First observedv2.3.4

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare destructiveHint=true, idempotentHint=true, openWorldHint=true and readOnlyHint=false, so the safety profile is covered. The description adds nothing beyond that: it does not say whether the shared file itself survives, whether recipients lose access immediately, or how link shares and group shares differ. The raw DELETE endpoint line is protocol detail rather than behavioral disclosure.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two lines, purpose first, nothing bloated. The embedded REST endpoint is redundant for an agent but is the only extra, so the text stays tight and front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

This is a destructive, irreversible-looking operation with no output schema and no annotations explaining consequences, yet the description never covers what is destroyed, whether access is revoked for all recipients, or what a success response looks like. For a delete tool that gap is significant.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 50%: the well-explained `confirm` flag already carries its own meaning, while `share_id` is undocumented. The description's path template at least signals that share_id is the identifier in the URL, but it gives no format hint (numeric OCS id vs opaque token) and no pointer to nextcloud_list_shares or nextcloud_get_share for obtaining it.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

'Revoke one share' gives a specific verb (revoke) and resource (share), and the singular 'one' plus the {share_id} path template makes it distinguishable from nextcloud_list_shares, nextcloud_update_share and nextcloud_delete_item. It stops short of saying what kind of shares (file/link/group) are covered, which slightly blurs it against remove_participant.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The sentence restates purpose but gives no when-to-use or when-not-to-use guidance: no pointer to nextcloud_update_share for modification versus revocation, no mention of remove_participant for group shares, and no prerequisites such as ownership or admin rights. An agent must infer everything about tool selection from the name alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools