Skip to main content

delete_resource

Permanently delete a resource. Address it by its path, and set team for a team resource. Fails if no such resource exists in the target space. This cannot be undone.

With a credential that represents a user, omitting team targets that user's space. A team must be bound to the credential and the credential must be allowed to manage it; a userless organization credential must name such a team.

Parameters​

ParameterTypeRequiredDescription
pathstringYesThe resource to delete, addressed by its path.
teamstringNoThe team that owns it. Omit to target the represented user's space.

Response​

FieldTypeDescription
deletedstringThe path you asked to delete — confirms completion.

Example​

{
"path": "docs/readme.md"
}

Result:

{
"deleted": "docs/readme.md"
}

Errors​

Each failure carries a precise code in the response. A domain rejection — a not-found, a limit, or a permission denial — is returned as a tool result with isError: true, so the agent can read the code and self-correct; malformed arguments and server faults are JSON-RPC protocol errors.

CodeCauseDelivered as
resource_not_foundNo resource with that path exists in the target space.tool error (isError)
team_not_foundNo team with that name is bound to this credential.tool error (isError)
forbiddenYour credential isn't permitted to delete resources.tool error (isError)
personal_cannot_address_teamYou used a team/ prefix (or team field) with a personal credential.tool error (isError)
no_personal_spaceThis credential has no personal space — address a team instead.tool error (isError)
invalid_argumentsThe arguments are missing or don't match the input schema.protocol error (invalid_params)
internal_errorAn unexpected error occurred.protocol error (internal_error)

Notes​

  • Deletion is permanent.
  • Deleting a resource counts as one tool call against your plan's tool-invocation allowance.