Search for tests

MCP tool reference: search-test

Overview

The search-test tool looks up the ID of a test case given its name.

Return Type: Metadata about the test, including its ID.

Parameters

Required Parameters

Parameter
Type
Description

repoName

string

Repository name in owner/repo format (e.g., trunk-io/trunk)

testNameSearch

string

Search string for the test name. Does not include filepaths

Optional Parameters

Parameter
Type
Description

orgSlug

string

The name of your organization in the Trunk app

limit

number

Limit for test results to return, up to 20

Getting Parameter Values

If your AI assistant doesn't have direct access to Git information, use these commands:

Get repository name:

git remote -v

Look for the repository name in the output (e.g., trunk-io/trunk from [email protected]:trunk-io/trunk.git)

Usage Examples

Error Handling

Error
Cause
Resolution

No tests matched {searchString} in repo {repoName}

No results found

Check your search string and try again

Repository authorization error

Insufficient permissions or invalid repo name

Verify repository name format and your access permissions

Last updated

Was this helpful?