Skip to main content
Glama

List Import Sessions

list_import_sessions
Read-onlyIdempotent

List the credential's staged import sessions, newest first — the way to FIND an importSessionId when you don't have one. Every other tool in this family (get_import_session, set_import_mapping, commit_import_session, rollback_import_session) needs the id, and create_import_session returns it exactly once, so start here whenever a customer asks about "the import I ran" — especially before a rollback, where the id is what stands between them and undoing a bad import. Returns per session: id, kind, source (Staged upload vs Inline lineage from import_historical_sales_orders — inline rows have no file fields by design), status, file name/size/rowCount, totalOrders/committedOrders/failedOrders, and the created/committed/expires timestamps — no file contents, profile, or validation report (call get_import_session for those). Optional status filter (AwaitingUpload, Uploaded, Validated, Previewed, Committing, Committed, Failed, Cancelled, RolledBack); paged (Total pre-paging + limit/offset, default 25, max 100). Staged sessions live 7 days; Inline lineage sessions keep their year-long rollback window, so both recent uploads and still-rollbackable inline imports appear here.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "list_import_sessions"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoPage size (default 25, max 100).
offsetNoZero-based offset for paging (default 0).
statusNoOptional status filter (case-insensitive): AwaitingUpload, Uploaded, Validated, Previewed, Committing, Committed, Failed, Cancelled, RolledBack. Omit for every status.

Output Schema

NameRequiredDescriptionDefault
okNo
limitNo
totalNo
offsetNo
sessionsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, closed-world, non-destructive, so safety is covered. The description goes further with retention rules (staged sessions 7 days vs year-long inline rollback window), which records are visible, and what is deliberately omitted from results. The only shortfall is that pagination behavior beyond defaults is not spelled out.

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

Conciseness4/5

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

The core routing instruction is front-loaded in the first clause, and most sentences carry real information (sibling dependency, retention windows, field list). It is dense to the point of being long, with rhetorical flourish ('what stands between them and undoing a bad import') and a repeated enum list that the schema already provides.

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

Completeness5/5

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

For a paged, filtered list tool with an output schema and full annotations, the description covers the remaining gaps: which sessions appear, retention differences between Staged and Inline lineage, and what fields are absent so the agent knows to escalate to get_import_session. Nothing an agent needs to call it correctly is missing.

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

Parameters3/5

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

Schema coverage is 100% and the schema already lists the status values and limit/offset defaults, so the description largely restates them. It adds a small amount of meaning by noting the status filter is case-insensitive and that omitting it returns every status, but the 'Total pre-paging' note describes the response rather than a parameter.

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?

States a specific verb and resource (list staged import sessions, newest first) plus the job it serves: finding an importSessionId. It explicitly contrasts itself with get_import_session, set_import_mapping, commit_import_session, and rollback_import_session, so an agent can place it in the family without opening any schema.

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?

Gives an explicit trigger ('start here whenever a customer asks about "the import I ran"'), explains why the id cannot be obtained elsewhere (create_import_session returns it exactly once), and highlights the rollback case. It also names the alternative for detail (get_import_session) and the exclusion (no file contents, profile, or validation report).

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources