Get Chart Of Accounts
get_chart_of_accountsFull Description
Get the Chart of Accounts for this company
With the Cube MCP Server, you can:
get_chart_of_accountsGet the Chart of Accounts for this company
get_drilldown_dataUse this for TRANSACTION-LEVEL auditing. This is the lowest level of detail available. Use this when a user asks for "source data," "specific transactions," or "the details behind this number." A header will be present for each dimension the company has, the value of the data point, as well as any additional metadata that is stored about that data point.
IMPORTANT: The IDs for 'filter_dimension_ids' MUST be retrieved first using the 'get_chart_of_accounts' tool. Do not guess these IDs. All dimensions must be represented in this dictionary.
Prefer using 'get_financial_slice_of_data' for aggregated reporting. Only use this tool when transaction-level detail is specifically requested.
Args: filter_dimension_ids: A dictionary where each key is a dimension name and each value is the ID of a single child from that dimension in the Chart of Accounts. All dimensions must be represented in this dictionary. operation: A pandas DataFrame operation to run on the drilldown data. Common operations:
operation_parameters: The parameters to pass to the pandas operation. See pandas DataFrame documentation for operation-specific parameters. ctx: The context of the request. This is used to get the user company from the request context.
Returns: The result of the pandas operation as a string. If the resulting DataFrame exceeds 500 rows, it will be automatically truncated with a warning. If you see a truncation warning, refine your 'operation_parameters' to be more specific (e.g., use more filters or aggregation operations like 'sum()', 'mean()', etc.).
filter_dimension_idsobjectoperationstringoperation_parametersobjectget_financial_slice_of_dataUse this function to get a slice of financial data for this company. This function acts like a pivot table in a spreadsheet and will show a slice of financial data. The row and column headers will be on the top and left side of the grid. The filters will be applied to the data in the grid. Think of this as building a Summary Table. It aggregates data into a grid based on the dimensions you provide.
IMPORTANT: The IDs for 'filters', 'row_header_dimension_ids', and 'column_header_dimension_ids' MUST be retrieved first using the 'get_chart_of_accounts' tool. Do not guess these IDs.
Args: filters: A dictionary where each key is a dimension name and each value is the ID of a single child from that dimension in the Chart of Accounts. If a dimension is included in the filters, it should not be included in the row or column headers. These are global constraints on the data. row_header_dimension_ids: A list of IDs of children from a single dimension. This dimension IDs must be from the company's Chart of Accounts. This cannot be empty. column_header_dimension_ids: A list of IDs of children from a single dimension. This dimension IDs must be from the company's Chart of Accounts. This cannot be empty. ctx: The context of the request. This is used to get the user company from the request context.
Returns: A slice of financial data comprised of a grid of values with their corresponding row and column header dimension names added in the first row and column.
column_header_dimension_idsarrayfiltersobjectrow_header_dimension_idsarraylist_companiesList all companies the user has access to
select_companySelects which company of the ones the user has access to is used for requests.
Args: company_id: The ID of the company to select. ctx: The context of the request. This is used to get information about the user's session.
Returns: A message indicating the company has been selected.
company_idstring