Skip to content

Conversation

@Alexjitk
Copy link
Collaborator

@Alexjitk Alexjitk commented Oct 21, 2025

Added board stats tool for aggregate api.
https://monday.monday.com/boards/9579738460/pulses/9600024043

The tool accepts an aggregations array where each aggregation contains:
columnId (required): The board column to aggregate
function (optional): Aggregation function to apply (e.g., COUNT, SUM, AVERAGE, MIN, MAX)
If no function is provided, the column value is returned directly and automatically added to groupBy (if not added by the agent)

Filtering & Ordering: Apply filters and sort results using the same operators as other board tools

Grouping: Automatically handles groupBy logic for plain columns and transformative functions

Example Use Cases:
Count items by status
Calculate sum/average of numeric columns
Group items by truncated dates (weekly/monthly reports)
Get distinct counts of column values

Some examples:
image
image

image image image image image

…istics

- Introduced `BoardStatsTool` for retrieving aggregated statistics of boards.
- Added utility functions for handling input and constructing GraphQL queries.
- Created constants for managing complex and transformative aggregation functions.
- Defined GraphQL queries for fetching board statistics.
- Updated GraphQL schema to include new types and queries related to bulk import functionality.
- Introduced the BoardInsightsTool for aggregating insights from boards, including support for filters, grouping, and ordering.
- Added utility functions for handling input schema, filters, and select/group by elements.
- Created comprehensive tests for the BoardInsightsTool, covering various scenarios including filtering, grouping, and handling different value types.
- Updated GraphQL queries to support the new insights functionality.
- Replaced BoardStatsTool with BoardInsightsTool in the API tools index.
- Changed the filters structure from an object with rules to an array format for better consistency and usability.
- Introduced a new `filtersOperator` field to specify the logical operator for filters.
- Updated the handling of filters in the utility function to accommodate the new structure.
- Adjusted tests to reflect the changes in the filters format and ensure correct functionality.
- Replaced the deprecated `AggregateSelectFunctionName` with `BoardInsightsAggregationFunction` in the schema for better clarity and maintainability.
- Removed unused `complexFunctions` import and related error handling for unsupported functions.
- Updated the constants file to programmatically define allowed aggregation functions, excluding complex ones.
- Adjusted utility functions to align with the new aggregation structure.
…ed descriptions

- Added support for stringified fields: `aggregationsStringified`, `filtersStringified`, and `orderByStringified` to accommodate Microsoft Copilot compatibility.
- Updated the tool's description to clarify usage and preconditions for effective operation.
- Enhanced input validation to ensure either non-stringified or stringified fields are provided.
- Adjusted utility functions to handle the new stringified input formats.
- Expanded test coverage to validate the new functionality and ensure correct behavior with stringified inputs.
@Alexjitk Alexjitk changed the title Add board stats tool Add board insights tool Oct 22, 2025
@damian-rakus damian-rakus merged commit 2abc88b into master Oct 23, 2025
1 check passed
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.

4 participants