Skip to main content
Glama

preview_query

Estimate the number of records that will be migrated and view a sample to verify your filter before running a full migration. Prevents migrating too many records by checking the scope first.

Instructions

Preview how many records will be migrated before committing to a full run. Returns the total record count and a sample (up to 5 records) matching the query. ALWAYS call this before run_test_migration or run_full_migration when the user wants to filter or scope the migration — e.g. "only migrate closed tickets" or "just the records from 2024". This prevents accidentally migrating too many records.

For Jira: filter is JQL (e.g. "status = Done AND created >= 2024-01-01") For Salesforce: filter is a SOQL WHERE clause (e.g. "Status = 'Closed' AND CreatedDate >= 2024-01-01T00:00:00Z")

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
platformYesSource platform (jira or salesforce)
object_nameYesJira project key or Salesforce object name
filterNoJQL (Jira) or SOQL WHERE clause (Salesforce) to scope records
fieldsNoSpecific fields to preview (defaults to key fields)
Behavior4/5

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

With no annotations, the description carries full burden. It explains return values (record count, up to 5 sample records) and provides filter format details for Jira and Salesforce. It does not explicitly state it is read-only, but the preview verb implies no mutation. Minor missing details on errors or authentication but overall solid.

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?

The description is concise with three focused paragraphs: purpose and returns, usage guidelines, and filter format. No filler, front-loaded with key info, and each sentence earns its place.

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 no output schema, the description adequately describes return values. It covers all 4 parameters with context. It ties into sibling migration tools. A small gap is not discussing error conditions or performance impacts, but it is sufficient for safe usage.

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 coverage is 100%, so baseline is 3. The description adds value by giving concrete examples for platform, filter (JQL/SOQL), and clarifying object_name as 'Jira project key or Salesforce object name'. It explains fields default to key fields. This enriches 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 'Preview how many records will be migrated' and distinguishes from siblings like run_full_migration and run_test_migration by explicitly advising to call this before those tools. It specifies the resource (records) and action (preview).

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?

The description gives strong usage guidance: 'ALWAYS call this before run_test_migration or run_full_migration when the user wants to filter or scope the migration'. It provides concrete examples and explicitly names alternative tools for the same context.

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/pinnintisagarSB/ServiceNow-Dev-MCP'

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