omnifocus-mcp-enhanced
Version:
๐ NEW: Native Custom Perspective Access! Enhanced MCP server with OmniFocus custom perspective support, hierarchical task display, AI-optimized tool selection, and comprehensive task management
35 lines (29 loc) โข 753 B
JavaScript
// ่ทๅๆๆ่ชๅฎไน้่งๅ่กจ
// ๅบไบ OmniJS API: Perspective.Custom.all
(() => {
try {
// ่ทๅๆๆ่ชๅฎไน้่ง
const customPerspectives = Perspective.Custom.all;
// ๆ ผๅผๅ็ปๆ
const perspectives = customPerspectives.map(p => ({
name: p.name,
identifier: p.identifier
}));
// ่ฟๅ็ปๆ
const result = {
success: true,
count: perspectives.length,
perspectives: perspectives
};
return JSON.stringify(result);
} catch (error) {
// ้่ฏฏๅค็
const errorResult = {
success: false,
error: error.message || String(error),
count: 0,
perspectives: []
};
return JSON.stringify(errorResult);
}
})();