Skip to main content
Glama

delete_share

DestructiveIdempotent

Revoke access to a Nextcloud share by ID without deleting the shared file or folder. Use it to remove or leave shares, including federated shares.

Instructions

Delete (unshare) a share by its ID.

This revokes access for the share recipient. The file/folder itself is not deleted. Called by the recipient on a share they received (list_shares with shared_with_me), it removes the share from their files instead: a share made directly to them is deleted for the owner too, a group share only stops showing up for them. Leaving a federated share tells the other server, except for a federated group share, which goes back to list_pending_shares instead, under the id it had in list_shares.

Args: share_id: The share ID to delete. Use list_shares to find share IDs. Pass federated share IDs as strings: they can be too long for a JSON number. federated: True to leave a federated share received from another server (federated: true in list_shares with shared_with_me). Those are numbered separately from this server's shares.

Returns: Confirmation message.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
share_idYes
federatedNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.9.0
    • addedInput schema / properties / federated
      Added value: +{
      +  "default": false,
      +  "title": "Federated",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / share_id / anyOf
      Added value: +[
      +  {
      +    "type": "integer"
      +  },
      +  {
      +    "type": "string"
      +  }
      +]
    • removedInput schema / properties / share_id / type
      Removed value: -"integer"
  2. First observedv0.7.0

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, readOnlyHint=false, idempotentHint=true, so safety is covered. The description adds high-value context beyond that: the target file/folder survives, direct shares are removed for the owner too, group shares only disappear for the recipient, and federated shares notify the remote server. It does not note permission requirements, but the mutation semantics are well disclosed.

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?

Front-loaded with purpose and scope, then the edge cases in order of importance. The federated group-share caveat is dense and slightly over-explained, but every clause conveys a distinct behavioral rule rather than filler, so it largely earns its length.

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

Completeness5/5

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

For a destructive tool with an output schema present, the description covers the full decision space: owner vs recipient semantics, direct vs group share outcomes, and local vs federated handling. Combined with annotations and the output schema, nothing an agent needs to call it correctly is missing.

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

Parameters5/5

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

Schema description coverage is 0%, so the description carries the full burden and does. It tells the agent share_id comes from list_shares and that federated IDs must be passed as strings because they may exceed JSON number limits (matching the anyOf integer|string schema), and explains that federated=True targets received federated shares numbered separately.

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

Purpose5/5

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

States a specific verb and resource ('Delete (unshare) a share by its ID') and immediately disambiguates from delete_file by clarifying the file/folder itself is not deleted. An agent can distinguish this from sibling tools like delete_file, delete_collective_share, and delete_form_share.

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

Usage Guidelines5/5

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

Explicitly describes two distinct caller contexts (owner deleting vs recipient unsharing via list_shares with shared_with_me) and the differing outcomes for direct vs group shares. Names the alternatives (list_shares, list_pending_shares) and the exact condition (federated: true) that routes to the federated path.

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