SiftDocs
Developer

Run and verify your first MCP read

Check the organization, run a small Sift search, and tell a result with no matches from a permission error.

Connect your AI app before you start. Start with a small search on an organization you recognize and open a conversation to check the result.

At a glance

CheckWhat to look for
OrganizationThe organization ID you intended to query
Read permissionThe account or key is allowed to make this read
Successful searchUp to three rows with matching status
No matchesAn empty list and any explanation Sift returns
More matchesA cursor for the next page
Refused requestAn error you can diagnose

What you're looking at

MCP connects an external AI app to Sift. Your account or key decides which Sift data the app can use. A request that says “read only” tells the assistant what to do. Permissions decide what the app can do.

Select the organization

  • When you connect one organization, Sift uses that organization. Check its name before you use any result.
  • When you connect All organizations, call list_orgs and find the organization ID. Pass it in the tool’s org field on each read. That keeps another chat from changing which organization this read uses.
  • A new all-organizations connection has no active organization. If the tool asks you to choose one, give the ID for that call, or use switch_org if you want to change the connection’s active organization.
  1. Ask the client to read sift.spec("query.search.actions") using execute if the tool is available.

  2. For a personal connection that can use several organizations, pass the following input to execute. Replace YOUR_ORGANIZATION_ID with the ID from list_orgs. For a connection to just one organization, you can omit org.

    {
      "org": "YOUR_ORGANIZATION_ID",
      "code": "return await sift.call('query.search.actions', { filter: { filterType: 'status', operator: 'in', value: ['OPEN'] }, limit: 3 })"
    }
  3. For an all-organizations connection, match the ID in the organization line to the ID you chose. Open a returned Sift link and check the case status. A short page of matches is a sample.

This example uses fictional values. The organization line identifies the workspace. The search output lists the cases.

Organization: Example Support (YOUR_ORGANIZATION_ID)

{
  "items": [{
    "actionId": "EXAMPLE_CASE_ID",
    "siftUrl": "https://app.getsift.ai/example-case-link"
  }],
  "nextCursor": null
}

Read the result or troubleshoot it

ResultWhat to do
items has rowsOpen the row’s Sift link, such as siftUrl where returned.
items is emptyRead emptyReason if present. Check the organization, filters, and data the account can see.
nextCursor has a valueUse the cursor for the next page with the same filters if you need more rows.
Sign-in or 401 errorSign in again or check that the configured key is valid.
Access refused or 403 errorCheck organization selection, Use MCP, the operation’s permissions, and the key’s scope. Treat refusal separately from an empty result.
The client does not show executeCheck the tools available to your account and client. See MCP troubleshooting.

Use a key for an unattended read

Use the API keys guide to choose a key with read access and keep it in your client’s secret settings. Organization keys depend on the organization’s MCP defaults. If you use a key linked to a service account, have an admin check its effective access. Verify the tool call even if the connection signs in. If the call is refused, troubleshoot the key and its permissions before you rely on it for a report.

Tips

  • Use a scope you know has a matching case for your first check.
  • Keep this check to a search. Reply drafts and changes have separate approval rules.

On this page