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

projectsGetUserItem

Get an item for a user owned project

Details

  • Method: GET
  • Path: /users/{username}/projectsV2/{project_number}/items/{item_id}
  • Operation ID: projects/get-user-item

Parameters

{
  "project_number": {
    "description": "The project's number.",
    "required": true,
    "location": "path",
    "type": "integer"
  },
  "username": {
    "description": "The handle for the GitHub user account.",
    "required": true,
    "location": "path",
    "type": "string"
  },
  "item_id": {
    "description": "The unique identifier of the project item.",
    "required": true,
    "location": "path",
    "type": "integer"
  },
  "fields": {
    "description": "Limit results to specific fields, by their IDs. If not specified, the title field will be returned.\n\nExample: fields[]=123&fields[]=456&fields[]=789 or fields=123,456,789",
    "required": false,
    "location": "query",
    "type": "string"
  }
}

Response Schema

{
  "title": "Projects v2 Item",
  "description": "An item belonging to a project",
  "type": "object",
  "properties": {
    "id": {
      "type": "number",
      "description": "The unique identifier of the project item."
    },
    "node_id": {
      "type": "string",
      "description": "The node ID of the project item."
    },
    "project_url": {
      "type": "string",
      "format": "uri",
      "example": "https://api.github.com/users/monalisa/2/projectsV2/3",
      "description": "The API URL of the project that contains this item."
    },
    "content_type": {
      "title": "Projects v2 Item Content Type",
      "description": "The type of content tracked in a project item",
      "type": "string",
      "enum": [
        "Issue",
        "PullRequest",
        "DraftIssue"
      ]
    },
    "content": {
      "type": "object",
      "additionalProperties": true,
      "nullable": true,
      "description": "The content of the item, which varies by content type."
    },
    "creator": {
      "title": "Simple User",
      "description": "A GitHub user.",
      "type": "object",
      "properties": {
        "name": {
          "nullable": true,
          "type": "string"
        },
        "email": {
          "nullable": true,
          "type": "string"
        },
        "login": {
          "type": "string",
          "example": "octocat"
        },
        "id": {
          "type": "integer",
          "format": "int64",
          "example": 1
        },
        "node_id": {
          "type": "string",
          "example": "MDQ6VXNlcjE="
        },
        "avatar_url": {
          "type": "string",
          "format": "uri",
          "example": "https://github.com/images/error/octocat_happy.gif"
        },
        "gravatar_id": {
          "type": "string",
          "example": "41d064eb2195891e12d0413f63227ea7",
          "nullable": true
        },
        "url": {
          "type": "string",
          "format": "uri",
          "example": "https://api.github.com/users/octocat"
        },
        "html_url": {
          "type": "string",
          "format": "uri",
          "example": "https://github.com/octocat"
        },
        "followers_url": {
          "type": "string",
          "format": "uri",
          "example": "https://api.github.com/users/octocat/followers"
        },
        "following_url": {
          "type": "string",
          "example": "https://api.github.com/users/octocat/following{/other_user}"
        },
        "gists_url": {
          "type": "string",
          "example": "https://api.github.com/users/octocat/gists{/gist_id}"
        },
        "starred_url": {
          "type": "string",
          "example": "https://api.github.com/users/octocat/starred{/owner}{/repo}"
        },
        "subscriptions_url": {
          "type": "string",
          "format": "uri",
          "example": "https://api.github.com/users/octocat/subscriptions"
        },
        "organizations_url": {
          "type": "string",
          "format": "uri",
          "example": "https://api.github.com/users/octocat/orgs"
        },
        "repos_url": {
          "type": "string",
          "format": "uri",
          "example": "https://api.github.com/users/octocat/repos"
        },
        "events_url": {
          "type": "string",
          "example": "https://api.github.com/users/octocat/events{/privacy}"
        },
        "received_events_url": {
          "type": "string",
          "format": "uri",
          "example": "https://api.github.com/users/octocat/received_events"
        },
        "type": {
          "type": "string",
          "example": "User"
        },
        "site_admin": {
          "type": "boolean"
        },
        "starred_at": {
          "type": "string",
          "example": "\"2020-07-09T00:17:55Z\""
        },
        "user_view_type": {
          "type": "string",
          "example": "public"
        }
      },
      "required": [
        "avatar_url",
        "events_url",
        "followers_url",
        "following_url",
        "gists_url",
        "gravatar_id",
        "html_url",
        "id",
        "node_id",
        "login",
        "organizations_url",
        "received_events_url",
        "repos_url",
        "site_admin",
        "starred_url",
        "subscriptions_url",
        "type",
        "url"
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "example": "2022-04-28T12:00:00Z",
      "description": "The time when the item was created."
    },
    "updated_at": {
      "type": "string",
      "format": "date-time",
      "example": "2022-04-28T12:00:00Z",
      "description": "The time when the item was last updated."
    },
    "archived_at": {
      "type": "string",
      "format": "date-time",
      "example": "2022-04-28T12:00:00Z",
      "nullable": true,
      "description": "The time when the item was archived."
    },
    "item_url": {
      "type": "string",
      "format": "uri",
      "example": "https://api.github.com/users/monalisa/2/projectsV2/items/3",
      "nullable": true,
      "description": "The API URL of this item."
    },
    "fields": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": true
      },
      "description": "The fields and values associated with this item."
    }
  },
  "required": [
    "id",
    "content_type",
    "created_at",
    "updated_at",
    "archived_at"
  ]
}

Usage

from ocp_agent import OCPAgent

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

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