Skip to main content
Glama

delete_repo_issue

Remove issues from repositories on the Tangled git collaboration platform. Specify repository and issue number to delete unwanted or resolved issues.

Instructions

delete an issue from a repository

Args: repo: repository identifier in 'owner/repo' format issue_id: issue number to delete

Returns: DeleteIssueResult with issue_id of deleted issue

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repoYesrepository identifier in 'owner/repo' format (e.g., 'zzstoatzz/tangled-mcp')
issue_idYesissue number to delete (e.g., 1, 2, 3...)

Implementation Reference

  • Tool handler function `delete_repo_issue` decorated with `@tangled_mcp.tool`. Resolves repo identifier, delegates to `_tangled.delete_issue`, and wraps result in `DeleteIssueResult`. Defines input schema via Annotated parameters.
    @tangled_mcp.tool def delete_repo_issue( repo: Annotated[ str, Field( description="repository identifier in 'owner/repo' format (e.g., 'zzstoatzz/tangled-mcp')" ), ], issue_id: Annotated[ int, Field(description="issue number to delete (e.g., 1, 2, 3...)") ], ) -> DeleteIssueResult: """delete an issue from a repository Args: repo: repository identifier in 'owner/repo' format issue_id: issue number to delete Returns: DeleteIssueResult with issue_id of deleted issue """ # resolve owner/repo to (knot, did/repo) _, repo_id = _tangled.resolve_repo_identifier(repo) # delete_issue doesn't need knot (uses atproto deleteRecord, not XRPC) _tangled.delete_issue(repo_id, issue_id) return DeleteIssueResult(issue_id=issue_id)
  • Pydantic model `DeleteIssueResult` used as return type, defining the output schema (contains `issue_id`).
    class DeleteIssueResult(BaseModel): """result of deleting an issue""" issue_id: int
  • Core helper `delete_issue` called by the tool handler. Locates the specific issue record using `repo.list_records`, extracts the rkey, and deletes it using `repo.delete_record`. This is the actual implementation performing the deletion.
    def delete_issue(repo_id: str, issue_id: int) -> dict[str, str]: """delete an issue from a repository Args: repo_id: repository identifier in "did/repo" format (e.g., 'did:plc:.../tangled-mcp') issue_id: the sequential issue number (e.g., 1, 2, 3...) Returns: dict with uri of deleted issue record """ client = _get_authenticated_client() if not client.me: raise RuntimeError("client not authenticated") # parse repo_id to get owner_did and repo_name if "/" not in repo_id: raise ValueError(f"invalid repo_id format: {repo_id}") owner_did, repo_name = repo_id.split("/", 1) # get the repo AT-URI records = client.com.atproto.repo.list_records( models.ComAtprotoRepoListRecords.Params( repo=owner_did, collection="sh.tangled.repo", limit=100, ) ) repo_at_uri = None for record in records.records: if ( name := getattr(record.value, "name", None) ) is not None and name == repo_name: repo_at_uri = record.uri break if not repo_at_uri: raise ValueError(f"repo not found: {repo_id}") # find the issue record with matching issueId existing_issues = client.com.atproto.repo.list_records( models.ComAtprotoRepoListRecords.Params( repo=client.me.did, collection="sh.tangled.repo.issue", limit=100, ) ) issue_uri = None issue_rkey = None for record in existing_issues.records: if ( (repo := getattr(record.value, "repo", None)) is not None and repo == repo_at_uri and (_issue_id := getattr(record.value, "issueId", None)) is not None and _issue_id == issue_id ): issue_uri = record.uri issue_rkey = record.uri.split("/")[-1] break if not issue_uri or not issue_rkey: raise ValueError(f"issue #{issue_id} not found in repo {repo_id}") # delete the issue record client.com.atproto.repo.delete_record( models.ComAtprotoRepoDeleteRecord.Data( repo=client.me.did, collection="sh.tangled.repo.issue", rkey=issue_rkey, ) ) return {"uri": issue_uri}

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/zzstoatzz/tangled-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server