Skip to content

delete_record returns success for non-existent records #76

Description

@zzstoatzz

Summary

delete_record returns a success response when attempting to delete a record that doesn't exist, which can be misleading.

Steps to Reproduce

  1. Authenticate as user A (zzstoatzzdevlog.bsky.social / did:plc:o53crari67ge7bvbv273lxln)
  2. Attempt to delete a record that belongs to user B (zzstoatzz.io / did:plc:xbtmt2zjwlrfegqvch7fboei) using shorthand URI:
delete_record(uri="tech.waow.slides.deck/3md2ye7te3v2v")
  1. Observe the response:
{"deleted": "at://did:plc:o53crari67ge7bvbv273lxln/tech.waow.slides.deck/3md2ye7te3v2v"}
  1. The record still exists in the original repo (user B's)

Expected Behavior

One of:

  • Return an error or distinct response indicating the record was not found
  • Return {"deleted": null, "reason": "not_found"} or similar
  • When using shorthand URIs, check if the record exists before claiming success

Actual Behavior

Returns success with the constructed URI (using authenticated user's DID), even though:

  • The record never existed in the authenticated user's repo
  • The actual record (in user B's repo) is untouched

Root Cause

ATProto's deleteRecord is idempotent - deleting a non-existent record returns success. The MCP constructs the full URI from the authenticated user's DID when given a shorthand, then calls deleteRecord, which "succeeds" on a record that was never there.

Suggested Fix

Before returning success, verify the record existed (either by checking beforehand, or by comparing the state before/after). Alternatively, document this behavior clearly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions