feat(createRecord): Return referenceURL in response#31
Merged
dvcrn merged 1 commit intoApr 23, 2026
Merged
Conversation
…response Adds the DEVONthink item link to the createRecord response, enabling cross-application automation workflows that need to reference the newly created record.
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates the create_record tool to include the referenceURL of the newly created record in its response. The changes involve adding the referenceURL property to the tool's return type interfaces and ensuring the JXA script captures and returns this value from the DEVONthink record. I have no feedback to provide as there are no review comments.
Owner
|
lgtm! thanks for the PR ❤️ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds the
referenceURLfield to thecreate_recordresponse, returning the DEVONthink item link (x-devonthink-item://UUID) alongside the existinguuidfield.Motivation
When automating workflows that span multiple applications, the
referenceURLis essential for creating cross-app links. Common use cases include:Currently, users must either:
get_record_properties(wasteful, adds latency)This small change eliminates that friction entirely.
Changes
// src/tools/createRecord.ts { success: true, recordId: newRecord.id(), name: newRecord.name(), - uuid: newRecord.uuid() + uuid: newRecord.uuid(), + referenceURL: newRecord.referenceURL() }Testing
Tested with all record types:
Example response:
{ "success": true, "recordId": 14974, "name": "My Document", "uuid": "98B409E8-A58A-48AE-8EF2-29D3BFC79750", "referenceURL": "x-devonthink-item://98B409E8-A58A-48AE-8EF2-29D3BFC79750" }The returned URLs were verified to open the correct record in DEVONthink via
open "x-devonthink-item://...".Backward Compatibility
This is a purely additive change. Existing integrations continue to work unchanged—they simply gain access to an additional field.
Thanks for maintaining this excellent MCP server! 🙏