Open Context Protocol is live! 🚀 Read the launch post
getIssuePickerResource

getIssuePickerResource

Get issue picker suggestions

Details

  • Method: GET
  • Path: /rest/api/3/issue/picker
  • Operation ID: getIssuePickerResource

Parameters

{
  "query": {
    "description": "A string to match against text fields in the issue such as title, description, or comments.",
    "required": false,
    "location": "query",
    "type": "string"
  },
  "currentJQL": {
    "description": "A JQL query defining a list of issues to search for the query term. Note that `username` and `userkey` cannot be used as search terms for this parameter, due to privacy reasons. Use `accountId` instead.",
    "required": false,
    "location": "query",
    "type": "string"
  },
  "currentIssueKey": {
    "description": "The key of an issue to exclude from search results. For example, the issue the user is viewing when they perform this query.",
    "required": false,
    "location": "query",
    "type": "string"
  },
  "currentProjectId": {
    "description": "The ID of a project that suggested issues must belong to.",
    "required": false,
    "location": "query",
    "type": "string"
  },
  "showSubTasks": {
    "description": "Indicate whether to include subtasks in the suggestions list.",
    "required": false,
    "location": "query",
    "type": "boolean"
  },
  "showSubTaskParent": {
    "description": "When `currentIssueKey` is a subtask, whether to include the parent issue in the suggestions if it matches the query.",
    "required": false,
    "location": "query",
    "type": "boolean"
  }
}

Response Schema

{
  "additionalProperties": false,
  "description": "A list of issues suggested for use in auto-completion.",
  "properties": {
    "sections": {
      "description": "A list of issues for an issue type suggested for use in auto-completion.",
      "items": {
        "additionalProperties": false,
        "description": "A type of issue suggested for use in auto-completion.",
        "properties": {
          "id": {
            "description": "The ID of the type of issues suggested for use in auto-completion.",
            "readOnly": true,
            "type": "string"
          },
          "issues": {
            "description": "A list of issues suggested for use in auto-completion.",
            "items": {
              "additionalProperties": false,
              "description": "An issue suggested for use in the issue picker auto-completion.",
              "properties": {
                "id": {
                  "description": "The ID of the issue.",
                  "format": "int64",
                  "readOnly": true,
                  "type": "integer"
                },
                "img": {
                  "description": "The URL of the issue type's avatar.",
                  "readOnly": true,
                  "type": "string"
                },
                "key": {
                  "description": "The key of the issue.",
                  "readOnly": true,
                  "type": "string"
                },
                "keyHtml": {
                  "description": "The key of the issue in HTML format.",
                  "readOnly": true,
                  "type": "string"
                },
                "summary": {
                  "description": "The phrase containing the query string in HTML format, with the string highlighted with HTML bold tags.",
                  "readOnly": true,
                  "type": "string"
                },
                "summaryText": {
                  "description": "The phrase containing the query string, as plain text.",
                  "readOnly": true,
                  "type": "string"
                }
              },
              "type": "object"
            },
            "readOnly": true,
            "type": "array"
          },
          "label": {
            "description": "The label of the type of issues suggested for use in auto-completion.",
            "readOnly": true,
            "type": "string"
          },
          "msg": {
            "description": "If no issue suggestions are found, returns a message indicating no suggestions were found,",
            "readOnly": true,
            "type": "string"
          },
          "sub": {
            "description": "If issue suggestions are found, returns a message indicating the number of issues suggestions found and returned.",
            "readOnly": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "readOnly": true,
      "type": "array"
    }
  },
  "type": "object"
}

Usage

from ocp_agent import OCPAgent

agent = OCPAgent()
await agent.register_api('jira')

# Call this tool
result = await agent.call_tool('getIssuePickerResource', {
    # Add required parameters here
})