5f4f1f7508
Añade campos params y output al frontmatter YAML de las 506 funciones del registry. Cada parámetro tiene descripción semántica (qué representa, unidades, rango típico) y cada función describe qué produce su output. Permite a agentes razonar sobre cadenas de composición (ej: prices → log_return → sharpe_ratio) sin leer código.
1.9 KiB
1.9 KiB
name, kind, lang, domain, version, purity, signature, description, tags, uses_functions, uses_types, returns, returns_optional, error_type, imports, params, output, tested, tests, test_file_path, file_path
| name | kind | lang | domain | version | purity | signature | description | tags | uses_functions | uses_types | returns | returns_optional | error_type | imports | params | output | tested | tests | test_file_path | file_path | ||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| metabase_create_dashboard | function | go | infra | 1.0.0 | impure | func MetabaseCreateDashboard(client MetabaseClient, name, description string, collectionID int) (map[string]any, error) | Crea un nuevo dashboard vacio en Metabase. Para agregar cards usar MetabaseUpdateDashboard con el campo dashcards. Endpoint: POST /api/dashboard. |
|
|
false | error_go_core |
|
|
mapa con los detalles del dashboard creado incluyendo su ID | false | functions/infra/metabase_create_dashboard.go |
Ejemplo
// Crear dashboard vacio
dashboard, err := MetabaseCreateDashboard(client, "Sales Overview", "KPIs de ventas", 5)
if err != nil {
log.Fatal(err)
}
dashboardID := int(dashboard["id"].(float64))
// Luego agregar cards con MetabaseUpdateDashboard
MetabaseUpdateDashboard(client, dashboardID, map[string]any{
"dashcards": []map[string]any{
{"id": -1, "card_id": 42, "size_x": 6, "size_y": 4, "col": 0, "row": 0},
},
})
Notas
Parametros para un LLM
| Parametro | Tipo | Requerido | Descripcion |
|---|---|---|---|
| client | MetabaseClient | si | Cliente autenticado |
| name | string | si | Nombre del dashboard |
| description | string | no | Descripcion. Vacio = sin descripcion |
| collectionID | int | no | Coleccion destino. 0 = root |
El dashboard se crea vacio. Para agregar cards, usar MetabaseUpdateDashboard con el array dashcards. Retorna el objeto dashboard creado.