Repository navigation
Conversation
Contratto: nessun percorso del MCP legge i bucket. Una query su uno slug
pubblicato scaricava i parquet da GCS senza dichiararlo — misurato: 642 MB in
sei ore da `toolkit.mcp.server` su `rna_aiuti_stato` — e confondeva due
perimetri: workspace locale e dati pubblicati (che sono di dcl-mcp/gcs_query).
- `CatalogResolver.resolve_slug` accetta `source` ("all"|"workspace"|"gcs");
con "workspace" il manifest GCS non viene richiesto
- `layer_sql`/`layer_query` propagano `source`; il wrapper MCP passa sempre
"workspace"
- `toolkit_dataset` ha default "workspace" e **rifiuta** source diverso, con
messaggio che indica dcl-mcp
Verifica: query su `rna_aiuti_stato` (solo GCS) → `parquet_not_found`, 0 byte.
Suite 1480 test, ruff e mypy puliti.
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
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.
Sintesi
Il server MCP toolkit ora vede solo il workspace locale. Una query su uno slug pubblicato scaricava i parquet da GCS senza dichiararlo: misurato 642 MB in sei ore da
toolkit.mcp.serversurna_aiuti_stato. Confondeva due perimetri — workspace locale e dati pubblicati — e rendeva invisibile l'egress.Per i dati pubblicati c'è
dcl-mcp(gcs_query), che lo dichiara nel contratto del tool.Cosa cambia
CatalogResolver.resolve_slug(..., source="all"):"workspace"non chiede nemmeno il manifest GCS;"gcs"solo remoto;"all"resta il default per CLI e altri consumer.layer_sql/layer_querypropaganosource(default"all", invariato per la CLI).source="workspace".toolkit_dataset: defaultsource="workspace"e rifiuta valori diversi con errore esplicito che rimanda adcl-mcp.Verifica
layer_query(datasets=["rna_aiuti_stato"], mode="sql", ...)→[parquet_not_found] Slug 'rna_aiuti_stato' non trovato, 0,00 MB di rete.ruffemypypuliti.tests/test_mcp_local_only.py, markercontract):source="workspace"non invoca_gcs_files; il wrapper MCP passaworkspace;toolkit_datasetrifiutagcs; default locale.Note
toolkit_source(probe/ckan/links/sparql) è un'altra cosa — non legge i nostri bucket. Se si vuole "MCP locale" in senso stretto, vanno tolti in una PR separata (o tenuti nel CLI).toolkit.mcp.serverattive (6,9 h e 2,2 h) girano il codice vecchio.layer_querynella CLI èinspect config, che passaconfig_path(pipeline mode → leggeout/). Nessun comando CLI espone il catalog mode (datasets=), quindi nessun percorso CLI legge i bucket per ispezionare. In rete vanno solorun(sorgenti) escout(probe), per definizione.