Make input schemas more concise - #70
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR streamlines the input schema descriptions for several services by removing redundant and verbose explanations and renaming some input keys to make them more concise.
- Trimmed overly wordy descriptions across weather, utilities, reminders, messages, maps, location, contacts, and calendar services.
- Renamed several input keys (e.g. “startDate” to “start”, “searchText” to “query”) to reduce unnecessary token usage.
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| App/Services/Weather.swift | Removed redundant details from the "weather" tool description and input schema. |
| App/Services/Utilities.swift | Shortened the tool description to remove superfluous language. |
| App/Services/Reminders.swift | Renamed input keys and made descriptions more concise in reminders tools. |
| App/Services/Messages.swift | Updated key names and trimmed descriptions for message filtering. |
| App/Services/Maps.swift | Shortened map-related descriptions without affecting functionality. |
| App/Services/Location.swift | Removed extra verbiage from the geocoding input description. |
| App/Services/Contacts.swift | Streamlined contact search descriptions. |
| App/Services/Calendar.swift | Renamed several keys and simplified descriptions for calendar events. |
Comments suppressed due to low confidence (3)
App/Services/Reminders.swift:30
- Renaming input keys (e.g., 'startDate' to 'start', 'endDate' to 'end', and 'searchText' to 'query') is a breaking change. Consider adding migration notes in the documentation to ensure consumers are aware of the changes.
"startDate": .string(
App/Services/Calendar.swift:88
- Renaming input keys for calendar events (e.g., 'startDate' to 'start', 'endDate' to 'end', 'calendarName' to 'calendar', and 'searchText' to 'query') could impact external integrations. Ensure that migration guidelines and proper documentation are provided.
if case let .string(start) = arguments["startDate"],
App/Services/Messages.swift:94
- Changing keys (from 'startDate' to 'start', 'endDate' to 'end', and 'searchTerm' to 'query') is an API design change that might break existing clients. Please confirm that proper release notes and client communication are in place.
if let startDateStr = arguments["startDate"]?.stringValue,
Owner
Author
|
Haven't tried Copilot PR before! This seems like a good opportunity, since it's a lot of copy-pasta verification. Edit: Not bad 😃 |
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.
One of my pet peeves is documentation that just repeats the name of the symbol. Gosh, how it grinds my gears 😡
And yet, we're doing plenty of that now with iMCP. Mea culpa.
But it's not merely annoying, it's wasteful. We're paying for all of those extra tokens each time we make a request, and that really adds up.
This PR aims to trim the fat, rewording to make tool and parameter descriptions more concise, and removing them if they're self-explanatory (e.g.
longitudein amaps.exploretool).tools/listformatted JSON responseswc before.json 868 2079 35163 before.JSON wc after.json 852 1775 32307 after.JSONThis optimization reduces the response by 8.1% (2,856 characters), or about 700-750 fewer tokens. Pretty good!