- 
                Notifications
    You must be signed in to change notification settings 
- Fork 42
Add board insights tool #115
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
          
     Merged
      
      
    
                
     Merged
            
            
          Conversation
  
    
      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
    
  
  
    
    …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.
              
                    shlomiatmonday
  
              
              approved these changes
              
                  
                    Oct 22, 2025 
                  
              
              
            
            
- 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.
        
          
                packages/agent-toolkit/src/core/tools/platform-api-tools/board-insights/board-insights-tool.ts
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                packages/agent-toolkit/src/core/tools/platform-api-tools/board-stats/board-stats-tool.ts
          
            Show resolved
            Hide resolved
        
              
          
                packages/agent-toolkit/src/core/tools/platform-api-tools/board-stats/board-stats-tool.ts
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                packages/agent-toolkit/src/core/tools/platform-api-tools/board-stats/board-stats-tool.ts
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                packages/agent-toolkit/src/core/tools/platform-api-tools/board-stats/board-stats-tool.ts
              
                Outdated
          
            Show resolved
            Hide resolved
        
      - 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.
              
                    damian-rakus
  
              
              approved these changes
              
                  
                    Oct 22, 2025 
                  
              
              
            
            
  
    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.
  
    
  
    
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:

