Skip to main content
Glama

get_query_results

Read-onlyIdempotent

Get the results of a BigQuery SQL query job.

Use this tool ONLY when:

  1. A previous execute_sql or execute_sql_readonly call returned job_complete: false with a job_id (poll with this tool until job_complete: true), OR

  2. You need to paginate through additional rows using page_token or start_index for a previously completed job.

Do NOT call this tool if the query already returned job_complete: true with all rows.

Supports pagination. Use max_results to limit results and page_token to retrieve the next page of results.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
jobIdYesRequired. Job ID of the query job.
locationYesRequired. The geographic location of the job.
pageTokenNoOptional. Page token, returned by a previous call, to request the next page of results.
projectIdYesRequired. Project ID of the query job.
timeoutMsNoOptional. Specifies the maximum amount of time, in milliseconds, that the client is willing to wait for the query to complete.
maxResultsNoOptional. Maximum number of results to read.
startIndexNoOptional. Zero-based index of the starting row.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
rowsNoAn object with as many results as can be contained within the maximum permitted reply size. To get any additional rows, you can call GetQueryResults and specify the jobReference returned above.
jobIdNoOutput only. The ID of the BigQuery job created for this query, if any. Present when a query job is created (e.g. for long-running operations, DML, scripts). Use this ID with `get_query_results`, `cancel_job`, or `get_job`.
errorsNoOutput only. The first errors or warnings encountered during the running of the job. The final message includes the number of errors that caused the process to stop. Errors here do not necessarily mean that the job has completed or was unsuccessful. For more information about error messages, see [Error messages](https://cloud.google.com/bigquery/docs/error-messages).
schemaNoThe schema of the results. Present only when the query completes successfully.
queryIdNoOutput only. The ID of the query.
jobCompleteNoWhether the query has completed or not. If rows or totalRows are present, this will always be true. If this is false, totalRows will not be available.
totalSlotMsNoOutput only. Number of slot ms the user is actually billed for.
totalBytesBilledNoOutput only. The total number of bytes billed for the query. Only applies if the project is configured to use on-demand pricing.
numDmlAffectedRowsNoOutput only. The number of rows affected by a DML statement.
totalBytesProcessedNoOutput only. The total number of bytes processed for this query.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / location / description
      Previous value: -"Optional. The geographic location of the job."New value: +"Required. The geographic location of the job."
    • changedInput schema / required
      Previous value: -[
      -  "projectId",
      -  "jobId"
      -]New value: +[
      +  "projectId",
      +  "jobId",
      +  "location"
      +]
  2. Changed2 schema fields changed
    • changedInput schema / properties / location / description
      Previous value: -"Required. The geographic location of the job."New value: +"Optional. The geographic location of the job."
    • changedInput schema / required
      Previous value: -[
      -  "projectId",
      -  "jobId",
      -  "location"
      -]New value: +[
      +  "projectId",
      +  "jobId"
      +]
  3. Changed2 schema fields changed
    • changedInput schema / properties / location / description
      Previous value: -"Optional. The geographic location of the job."New value: +"Required. The geographic location of the job."
    • changedInput schema / required
      Previous value: -[
      -  "projectId",
      -  "jobId"
      -]New value: +[
      +  "projectId",
      +  "jobId",
      +  "location"
      +]
  4. Changed2 schema fields changed
    • changedInput schema / properties / location / description
      Previous value: -"Required. The geographic location of the job."New value: +"Optional. The geographic location of the job."
    • changedInput schema / required
      Previous value: -[
      -  "projectId",
      -  "jobId",
      -  "location"
      -]New value: +[
      +  "projectId",
      +  "jobId"
      +]
  5. Changed2 schema fields changed
    • changedInput schema / properties / location / description
      Previous value: -"Optional. The geographic location of the job."New value: +"Required. The geographic location of the job."
    • changedInput schema / required
      Previous value: -[
      -  "projectId",
      -  "jobId"
      -]New value: +[
      +  "projectId",
      +  "jobId",
      +  "location"
      +]
  6. Changed2 schema fields changed
    • changedInput schema / properties / location / description
      Previous value: -"Required. The geographic location of the job."New value: +"Optional. The geographic location of the job."
    • changedInput schema / required
      Previous value: -[
      -  "projectId",
      -  "jobId",
      -  "location"
      -]New value: +[
      +  "projectId",
      +  "jobId"
      +]
  7. Changed2 schema fields changed
    • changedInput schema / properties / location / description
      Previous value: -"Optional. The geographic location of the job."New value: +"Required. The geographic location of the job."
    • changedInput schema / required
      Previous value: -[
      -  "projectId",
      -  "jobId"
      -]New value: +[
      +  "projectId",
      +  "jobId",
      +  "location"
      +]
  8. Changed2 schema fields changed
    • changedInput schema / properties / location / description
      Previous value: -"Required. The geographic location of the job."New value: +"Optional. The geographic location of the job."
    • changedInput schema / required
      Previous value: -[
      -  "projectId",
      -  "jobId",
      -  "location"
      -]New value: +[
      +  "projectId",
      +  "jobId"
      +]
  9. Changed2 schema fields changed
    • changedInput schema / properties / location / description
      Previous value: -"Optional. The geographic location of the job."New value: +"Required. The geographic location of the job."
    • changedInput schema / required
      Previous value: -[
      -  "projectId",
      -  "jobId"
      -]New value: +[
      +  "projectId",
      +  "jobId",
      +  "location"
      +]
  10. Changed2 schema fields changed
    • changedInput schema / properties / location / description
      Previous value: -"Required. The geographic location of the job."New value: +"Optional. The geographic location of the job."
    • changedInput schema / required
      Previous value: -[
      -  "projectId",
      -  "jobId",
      -  "location"
      -]New value: +[
      +  "projectId",
      +  "jobId"
      +]
  11. Changed2 schema fields changed
    • changedInput schema / properties / location / description
      Previous value: -"Optional. The geographic location of the job."New value: +"Required. The geographic location of the job."
    • changedInput schema / required
      Previous value: -[
      -  "projectId",
      -  "jobId"
      -]New value: +[
      +  "projectId",
      +  "jobId",
      +  "location"
      +]
  12. Changed2 schema fields changed
    • changedInput schema / properties / location / description
      Previous value: -"Required. The geographic location of the job."New value: +"Optional. The geographic location of the job."
    • changedInput schema / required
      Previous value: -[
      -  "projectId",
      -  "jobId",
      -  "location"
      -]New value: +[
      +  "projectId",
      +  "jobId"
      +]
  13. Changed2 schema fields changed
    • changedInput schema / properties / location / description
      Previous value: -"Optional. The geographic location of the job."New value: +"Required. The geographic location of the job."
    • changedInput schema / required
      Previous value: -[
      -  "projectId",
      -  "jobId"
      -]New value: +[
      +  "projectId",
      +  "jobId",
      +  "location"
      +]
  14. Changed2 schema fields changed
    • changedInput schema / properties / location / description
      Previous value: -"Required. The geographic location of the job."New value: +"Optional. The geographic location of the job."
    • changedInput schema / required
      Previous value: -[
      -  "projectId",
      -  "jobId",
      -  "location"
      -]New value: +[
      +  "projectId",
      +  "jobId"
      +]
  15. Changed2 schema fields changed
    • changedInput schema / properties / location / description
      Previous value: -"Optional. The geographic location of the job."New value: +"Required. The geographic location of the job."
    • changedInput schema / required
      Previous value: -[
      -  "projectId",
      -  "jobId"
      -]New value: +[
      +  "projectId",
      +  "jobId",
      +  "location"
      +]
  16. Changed2 schema fields changed
    • changedInput schema / properties / location / description
      Previous value: -"Required. The geographic location of the job."New value: +"Optional. The geographic location of the job."
    • changedInput schema / required
      Previous value: -[
      -  "projectId",
      -  "jobId",
      -  "location"
      -]New value: +[
      +  "projectId",
      +  "jobId"
      +]
  17. Changed2 schema fields changed
    • changedInput schema / properties / location / description
      Previous value: -"Optional. The geographic location of the job."New value: +"Required. The geographic location of the job."
    • changedInput schema / required
      Previous value: -[
      -  "projectId",
      -  "jobId"
      -]New value: +[
      +  "projectId",
      +  "jobId",
      +  "location"
      +]
  18. Added
  19. Removed
  20. Added
  21. Removed
  22. Added
  23. Removed
  24. Added
  25. Removed
  26. Added
  27. Removed
  28. Added
  29. Removed
  30. Added
  31. Removed
  32. Added
  33. Removed
  34. Added
  35. Removed
  36. Added
  37. Removed
  38. Added
  39. Removed
  40. Added
  41. Removed
  42. Added
  43. Removed
  44. Added
  45. Removed
  46. Added
  47. Removed
  48. Added
  49. Removed
  50. Added

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources