Skip to main content
Glama
houtini-ai

Better Google Search Console

by houtini-ai

check_sync_status

Monitor background sync job progress for Google Search Console data downloads. Check specific jobs or view all active/recent syncs to track data import status.

Instructions

Check the status of a background sync job. If no jobId provided, returns all active and recent jobs. Use after sync_gsc_data or sync_all_properties to monitor progress.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
jobIdNoJob ID from sync_gsc_data or sync_all_properties. Omit to see all jobs.

Implementation Reference

  • Handler function for check_sync_status tool that calls syncManager.getStatus() and returns JSON status. Handles errors and returns them as error responses.
    async (args) => {
      try {
        const status = syncManager.getStatus(args.jobId);
        return { content: [{ type: 'text', text: JSON.stringify(status, null, 2) }] };
      } catch (error) {
        return { content: [{ type: 'text', text: JSON.stringify({ error: (error as Error).message }) }], isError: true };
      }
    }
  • Core getStatus method that retrieves status for a specific jobId or returns all jobs. Returns SyncStatus object(s) with job progress, results, and error information.
    getStatus(jobId?: string): SyncStatus | SyncStatus[] {
      if (jobId) {
        const job = this.jobs.get(jobId);
        if (!job) {
          return {
            jobId,
            status: 'failed',
            totalProperties: 0,
            completedProperties: 0,
            currentProperty: null,
            rowsFetched: 0,
            estimatedTotalRows: null,
            apiCallsMade: 0,
            startedAt: '',
            elapsedMs: 0,
            results: [],
            error: `Job ${jobId} not found. It may have expired from history.`,
          };
        }
        return this.jobToStatus(job);
      }
      return this.jobOrder.map(id => this.jobToStatus(this.jobs.get(id)!));
    }
  • src/server.ts:425-439 (registration)
    Registration of check_sync_status tool with MCP server. Defines tool name, description, input schema (optional jobId parameter), and handler function.
    server.tool(
      'check_sync_status',
      'Check the status of a background sync job. If no jobId provided, returns all active and recent jobs. Use after sync_gsc_data or sync_all_properties to monitor progress.',
      {
        jobId: z.string().optional().describe('Job ID from sync_gsc_data or sync_all_properties. Omit to see all jobs.'),
      },
      async (args) => {
        try {
          const status = syncManager.getStatus(args.jobId);
          return { content: [{ type: 'text', text: JSON.stringify(status, null, 2) }] };
        } catch (error) {
          return { content: [{ type: 'text', text: JSON.stringify({ error: (error as Error).message }) }], isError: true };
        }
      }
    );
  • SyncStatus interface defining the structure of sync job status returned by check_sync_status. Includes jobId, status, progress metrics, timing, and results array.
    export interface SyncStatus {
      jobId: string;
      status: SyncJobStatus;
      totalProperties: number;
      completedProperties: number;
      currentProperty: string | null;
      rowsFetched: number;
      estimatedTotalRows: number | null;
      apiCallsMade: number;
      startedAt: string;
      elapsedMs: number;
      results: SyncJobResult[];
      error?: string;
    }
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It discloses that the tool can return status for a specific job or all jobs, which is useful behavioral context. However, it doesn't mention error handling, response format, or what 'recent' means (timeframe).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, zero waste. First sentence states purpose and parameter behavior, second provides usage guidance. Every sentence earns its place with essential information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 1 parameter with full schema coverage and no output schema, the description is reasonably complete. It covers purpose, parameter semantics, and usage context. However, without annotations or output schema, it could benefit from more detail on response format or error cases.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3. The description adds value by explaining the semantics of omitting the parameter ('If no jobId provided, returns all active and recent jobs') and specifying where jobId comes from ('from sync_gsc_data or sync_all_properties'), which goes beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('check') and resource ('status of a background sync job'), and distinguishes from siblings by specifying it's for monitoring jobs from sync_gsc_data or sync_all_properties. It's specific about what the tool does.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states when to use ('Use after sync_gsc_data or sync_all_properties to monitor progress') and provides an alternative usage pattern ('If no jobId provided, returns all active and recent jobs'). This gives clear guidance on when and how to invoke the tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/houtini-ai/better-search-console'

If you have feedback or need assistance with the MCP directory API, please join our Discord server