-
Notifications
You must be signed in to change notification settings - Fork 2
feat: add workboard_get_team_objectives_tool for date-range-scoped OKR snapshots #24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
ghelleks
wants to merge
2
commits into
crunchtools:main
Choose a base branch
from
ghelleks:feat/team-objectives-date-range
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -16,6 +16,7 @@ | |||||
| get_objective_details, | ||||||
| get_objectives, | ||||||
| get_team_members, | ||||||
| get_team_objectives, | ||||||
| get_team_workstreams, | ||||||
| get_teams, | ||||||
| get_user, | ||||||
|
|
@@ -59,7 +60,12 @@ | |||||
| "filters, workboard_get_activity_tool to get a single action item by ID, " | ||||||
| "workboard_create_activity_tool to create a new action item, and " | ||||||
| "workboard_update_activity_tool to update an existing action item's state, priority, " | ||||||
| "effort, due date, or owner." | ||||||
| "effort, due date, or owner.\n\n" | ||||||
| "TEAM OKR SNAPSHOTS: For quarterly OKR reviews or weekly snapshots that include " | ||||||
| "past-quarter objectives, use workboard_get_team_objectives_tool with a team_id " | ||||||
| "and explicit MM/DD/YYYY date bounds (e.g. startDate='01/01/2026', endDate='03/31/2026'). " | ||||||
| "This tool calls the date-range-scoped goalSummary endpoint and never silently drops " | ||||||
| "objectives whose target date has passed." | ||||||
| ), | ||||||
| ) | ||||||
|
|
||||||
|
|
@@ -414,6 +420,41 @@ async def workboard_get_team_workstreams_tool( | |||||
| return await get_team_workstreams(team_id=team_id) | ||||||
|
|
||||||
|
|
||||||
| @mcp.tool() | ||||||
| async def workboard_get_team_objectives_tool( | ||||||
| team_id: int, | ||||||
| start_date: str, | ||||||
| end_date: str, | ||||||
| get_nested_teams: bool = True, | ||||||
| ) -> dict[str, Any]: | ||||||
| """Get all objectives for a WorkBoard team within a quarter date range. | ||||||
|
|
||||||
| Use this instead of workboard_get_objectives_tool when you need team-scoped | ||||||
| or cross-quarter OKR snapshots. The existing user-scoped tool silently | ||||||
| excludes objectives whose target date has passed; this tool delegates the | ||||||
| date window entirely to the WorkBoard goalSummary API so past-quarter | ||||||
| objectives (e.g. Q1 after March 31) are returned correctly. | ||||||
|
|
||||||
| Use workboard_get_teams_tool to discover team IDs. | ||||||
|
|
||||||
| Args: | ||||||
| team_id: WorkBoard team ID (positive integer). | ||||||
| start_date: Quarter start date in MM/DD/YYYY format, e.g. "04/01/2026". | ||||||
| end_date: Quarter end date in MM/DD/YYYY format, e.g. "06/30/2026". | ||||||
| get_nested_teams: Include objectives from sub-teams (default True). | ||||||
|
|
||||||
| Returns: | ||||||
| List of objectives with name, owner, status_color, progress, and | ||||||
| nested key_results (name, progress, last_updated, target). | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The docstring lists
Suggested change
|
||||||
| """ | ||||||
| return await get_team_objectives( | ||||||
| team_id=team_id, | ||||||
| start_date=start_date, | ||||||
| end_date=end_date, | ||||||
| get_nested_teams=get_nested_teams, | ||||||
| ) | ||||||
|
|
||||||
|
|
||||||
| @mcp.tool() | ||||||
| async def workboard_create_workstream_tool( | ||||||
| ws_name: str, | ||||||
|
|
||||||
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The parameter names in the example instructions (
startDate,endDate) do not match the actual tool parameter names (start_date,end_date). This will cause the LLM to provide incorrect arguments when calling the tool.