@zack/csv-query
Query CSV data with structured filter, sort, select, and aggregate operations.
Install
agentpm install @zack/csv-query@0.1.4Load
import { load } from '@agentpm/sdk';
const t = await load('@zack/csv-query@0.1.4');from agentpm import load
t = load("@zack/csv-query@0.1.4")Weekly downloads
1
0%
Last publish
1d ago
v0.1.4
agent.json
{
"name": "csv-query",
"version": "0.1.4",
"description": "Query CSV data with structured filter, sort, select, and aggregate operations.",
"files": [
"csv_query/"
],
"entrypoint": {
"args": [
"-u",
"csv_query/__main__.py"
],
"command": "python",
"timeout_ms": 30000
},
"inputs": {
"type": "object",
"properties": {
"path": {
"type": "string",
"description": "Path to a local CSV file to query. Provide either path or csv_text."
},
"sort": {
"type": "array",
"items": {
"type": "object",
"description": "A sort object with column and optional direction fields."
},
"description": "Sort operations applied in order."
},
"limit": {
"type": "integer",
"minimum": 1,
"description": "Maximum number of rows to return after all other operations."
},
"filter": {
"type": "array",
"items": {
"type": "object",
"description": "A filter object with at least column, op, and value fields."
},
"description": "Filter conditions applied before grouping, sorting, and limiting."
},
"select": {
"type": "array",
"items": {
"type": "string",
"description": "Name of a CSV column to include in the output."
},
"description": "Subset of columns to keep in the returned rows."
},
"csv_text": {
"type": "string",
"description": "Raw CSV content to query directly. Provide either csv_text or path."
},
"group_by": {
"type": "array",
"items": {
"type": "string",
"description": "Name of a CSV column to group rows by."
},
"description": "Columns to group by before computing aggregations."
},
"aggregations": {
"type": "array",
"items": {
"type": "object",
"description": "An aggregation object such as count, sum, avg, min, or max."
},
"description": "Aggregate computations to run over the filtered rows or groups."
}
},
"additionalProperties": false
},
"outputs": {
"oneOf": [
{
"type": "object",
"required": [
"ok",
"columns",
"rows",
"row_count",
"summary"
],
"properties": {
"ok": {
"const": true,
"description": "True when the CSV query completed successfully."
},
"rows": {
"type": "array",
"items": {
"type": "object",
"description": "One result row represented as a JSON object."
},
"description": "Query result rows after filters, grouping, sorting, and selection."
},
"columns": {
"type": "array",
"items": {
"type": "string",
"description": "Name of an output column."
},
"description": "Column names present in the returned rows."
},
"summary": {
"type": "object",
"description": "Summary information about the query, such as grouping metadata or aggregate results.",
"additionalProperties": true
},
"row_count": {
"type": "integer",
"description": "Number of rows returned in the result set."
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"ok",
"error"
],
"properties": {
"ok": {
"const": false,
"description": "False when the query failed validation or execution."
},
"error": {
"type": "object",
"required": [
"code",
"message"
],
"properties": {
"code": {
"type": "string",
"description": "Stable machine-readable error code."
},
"message": {
"type": "string",
"description": "Human-readable explanation of the failure."
}
},
"description": "Structured error returned by the tool.",
"additionalProperties": true
}
},
"additionalProperties": false
}
]
},
"readme": "README.md",
"runtime": {
"type": "python",
"version": "3.11"
}
}Compatibility
NodePython