Fix CardDAV URL construction for contacts
All checks were successful
Build And Test / publish (push) Successful in 48s
All checks were successful
Build And Test / publish (push) Successful in 48s
- Add _build_url helper to properly construct URLs from paths - Fix test.sh to pass addressbook_id when listing contacts - Prevents path duplication when addressbook_id is a full path 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
12
test.sh
12
test.sh
@@ -74,10 +74,16 @@ echo -e "\n[6/7] Listing address books..."
|
||||
ADDRESSBOOKS=$(mcp_request 5 "tools/call" '{"name":"list_addressbooks","arguments":{}}')
|
||||
echo "$ADDRESSBOOKS"
|
||||
|
||||
# List contacts
|
||||
# List contacts (using first addressbook from previous response)
|
||||
echo -e "\n[7/7] Listing contacts..."
|
||||
CONTACTS=$(mcp_request 6 "tools/call" '{"name":"list_contacts","arguments":{"limit":10}}')
|
||||
echo "$CONTACTS"
|
||||
# Extract first addressbook ID from previous response
|
||||
ADDRESSBOOK_ID=$(echo "$ADDRESSBOOKS" | grep -o '"id":"[^"]*"' | head -1 | cut -d'"' -f4)
|
||||
if [ -n "$ADDRESSBOOK_ID" ]; then
|
||||
CONTACTS=$(mcp_request 6 "tools/call" "{\"name\":\"list_contacts\",\"arguments\":{\"addressbook_id\":\"$ADDRESSBOOK_ID\",\"limit\":10}}")
|
||||
echo "$CONTACTS"
|
||||
else
|
||||
echo "No addressbook found to list contacts from"
|
||||
fi
|
||||
|
||||
echo -e "\n================================"
|
||||
echo "All tests completed!"
|
||||
|
||||
Reference in New Issue
Block a user