MCPcopy Index your code
hub / github.com/simstudioai/sim / buildSearchUrl

Function buildSearchUrl

apps/sim/tools/jira/list_projects.ts:24–33  ·  view source on GitHub ↗
(cloudId: string, params: JiraListProjectsParams)

Source from the content-addressed store, hash-verified

22}
23
24function buildSearchUrl(cloudId: string, params: JiraListProjectsParams): string {
25 const queryParams = new URLSearchParams()
26 // `lead` is not returned by default on project/search — expand it so the lead outputs populate.
27 queryParams.append('expand', 'lead')
28 if (params.query) queryParams.append('query', params.query)
29 if (params.startAt !== undefined) queryParams.append('startAt', String(params.startAt))
30 if (params.maxResults !== undefined) queryParams.append('maxResults', String(params.maxResults))
31 const queryString = queryParams.toString()
32 return `https://api.atlassian.com/ex/jira/${cloudId}/rest/api/3/project/search${queryString ? `?${queryString}` : ''}`
33}
34
35export const jiraListProjectsTool: ToolConfig<JiraListProjectsParams, JiraListProjectsResponse> = {
36 id: 'jira_list_projects',

Callers 2

list_projects.tsFile · 0.85
fetchProjectsFunction · 0.85

Calls 1

toStringMethod · 0.45

Tested by

no test coverage detected