macOS: BigQuery MCP `browse_table` blocked in Read-Only Safe Mode

Aperta Adatta ai principianti
#4,385 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
70/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
google-cloud, sql, swift
Ambito
database

Direzione di ricerca

Inizia da BrowseTableTool in apple/TablePro/Core/MCP/Protocol/Tools/DataTools.swift (righe 93-119) e dal builder BigQuery in BigQueryQueryBuilder.swift (righe 110-166); nota la richiesta taggata BIGQUERY_BROWSE:. Poi leggi DefaultExecutionGate in DefaultExecutionGate.swift (righe 60-85) e il rendering SELECT in BigQueryPluginDriver+Execution.swift (righe 281-287). Riproduci con il controllo offline dello statement scanner dell'issue, confrontando la richiesta taggata e i livelli SQL renderizzati; fatto quando la navigazione in sola lettura restituisce una riga mentre il blocco delle scritture resta invariato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

What happened?

With Safe Mode set to Read-Only on a BigQuery connection, MCP browse_table returned:

Cannot execute write queries: TablePro's Safe Mode is set to read-only for this connection

list_databases, list_schemas, and describe_table succeeded on the same BigQuery connection.

Steps to reproduce
  1. Connect TablePro to a BigQuery test dataset, such as sample_dataset, with a table sample_rows(id INT64) containing one row. Set the connection’s Safe Mode to Read-Only.

  2. From an approved MCP client, call browse_table with the following arguments, replacing the placeholder with the test connection’s UUID:

    {"connection_id":"<test connection UUID>","schema":"sample_dataset","table":"sample_rows","limit":1}
    
Expected behavior

The browse returns up to one row, and Read-Only Safe Mode continues to block writes.

Environment
  • TablePro: 0.87.0 (870099)
  • Platform: macOS 27.2.1, Apple Silicon
  • Database: Google BigQuery (managed service; no server version reported)
Source and offline reproduction

BrowseTableTool submits a .readQuery operation, but the BigQuery builder returns a tagged request (BIGQUERY_BROWSE: or BIGQUERY_FILTER:). DefaultExecutionGate classifies that text before the driver renders the SELECT.

The offline check generated plain and filtered browse requests with the upstream builder, normalized them with the statement scanner, and used SQLStatementClassifier.classify to grade the requests and the SQL they render. The results matched on v0.87.0 and main at c422096:

Input Statement tier
Plain or filtered BigQuery browse request .write
SELECT rendered from either request .safe

The offline check did not run the application or contact BigQuery.

Lingua principale
Swift
Stelle
6.2k
Fork
412
Merge medio
7h 38m
PR unite (30g)
536

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di TableProApp/TablePro

Tutte le issue di TableProApp/TablePro

Issue simili

Altre issue su Swift

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.