Module: OmnifocusMcp::Mcp

Extended by:
Mcp
Included in:
Mcp
Defined in:
lib/omnifocus_mcp/mcp.rb

Constant Summary collapse

INSTRUCTIONS =
<<~INSTRUCTIONS
  OmniFocus MCP server for macOS task management.

  TOOL GUIDANCE:
  - Use query_omnifocus for targeted lookups; the "fields" parameter requests only needed fields
  - Use "summary: true" for quick counts without full data
  - For batch operations, prefer batch_add_items/batch_remove_items over repeated single calls

  RESOURCES:
  - omnifocus://inbox - current inbox items
  - omnifocus://today - today's agenda (due, planned, overdue)
  - omnifocus://flagged - all flagged items
  - omnifocus://stats - quick database statistics
  - omnifocus://project/{name} - tasks in a specific project
  - omnifocus://perspective/{name} - items in a named perspective

  QUERY FILTER TIPS:
  - Tags filter is case-sensitive and exact match
  - projectName filter is case-insensitive partial match
  - Status values for tasks: Next, Available, Blocked, DueSoon, Overdue
  - Status values for projects: Active, OnHold, Done, Dropped
  - Combine filters with AND logic; within arrays, OR logic applies
INSTRUCTIONS

Instance Method Summary collapse

Instance Method Details

#build_server(logger: FastMcp::Logger.new) ⇒ Object



37
38
39
40
41
42
# File 'lib/omnifocus_mcp/mcp.rb', line 37

def build_server(logger: FastMcp::Logger.new)
  FastMcp::Server.new(name: server_name, version: server_version, logger: logger).tap do |server|
    register_tools(server)
    register_resources(server)
  end
end

#server_nameObject



33
# File 'lib/omnifocus_mcp/mcp.rb', line 33

def server_name = "OmniFocus MCP"

#server_versionObject



35
# File 'lib/omnifocus_mcp/mcp.rb', line 35

def server_version = VERSION

#startObject



44
# File 'lib/omnifocus_mcp/mcp.rb', line 44

def start = build_server.start