Skip to content

Give alarms_create an object schema - #398

Open
oliverames wants to merge 1 commit into
mattt:mattt/ios-appfrom
oliverames:pr/alarm-object-schema
Open

oliverames wants to merge 1 commit into
mattt:mattt/ios-appfrom
oliverames:pr/alarm-object-schema

Conversation

@oliverames

Copy link
Copy Markdown
Contributor

alarms_create has an anyOf at the root of its input schema and no "type": "object". MCP requires that type, and the TypeScript SDK rejects the whole tools/list result when one tool lacks it. My cloud Claude sessions connected to iMCP and got no tools because of this.

What changed

  • alarms_create takes an object schema with fire_at, hour, minute and weekdays, and only title is required.
  • MobileTools.checkAlarmSchedule still accepts only the two forms, fire_at, or hour and minute with optional weekdays. The Mac checks it before it calls the phone, and MobileAlarmRequest checks it again.
  • A test checks that every mobile tool's schema is an object at its root.

mattt/ios-finance has the same schema.

Testing

  • imcp-serverTests: 241 tests, 1 skipped (pre-existing), 0 failures.
  • swift format lint --strict is clean on the changed files.
  • With the same change on my fork, a cloud session that had failed loaded the tools and called mobile_status.

Not verified

  • No alarm was created on an iPhone or iPad with the new schema.
  • The app wasn't built from this branch, and CI doesn't run for mattt/ios-app.

MCP requires an input schema with type object at its root. alarms_create had
a bare anyOf, so the MCP SDK rejected the whole tools/list result.
checkAlarmSchedule now enforces the two schedule forms.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant