ProjectsGet returns the tool and handler for getting GitHub Projects resources.
(t translations.TranslationHelperFunc)
| 296 | |
| 297 | // ProjectsGet returns the tool and handler for getting GitHub Projects resources. |
| 298 | func ProjectsGet(t translations.TranslationHelperFunc) inventory.ServerTool { |
| 299 | tool := NewTool( |
| 300 | ToolsetMetadataProjects, |
| 301 | mcp.Tool{ |
| 302 | Name: "projects_get", |
| 303 | Description: t("TOOL_PROJECTS_GET_DESCRIPTION", `Get details about specific GitHub Projects resources. |
| 304 | Use this tool to get details about individual projects, project fields, and project items by their unique IDs. |
| 305 | `), |
| 306 | Annotations: &mcp.ToolAnnotations{ |
| 307 | Title: t("TOOL_PROJECTS_GET_USER_TITLE", "Get details of GitHub Projects resources"), |
| 308 | ReadOnlyHint: true, |
| 309 | }, |
| 310 | InputSchema: &jsonschema.Schema{ |
| 311 | Type: "object", |
| 312 | Properties: map[string]*jsonschema.Schema{ |
| 313 | "method": { |
| 314 | Type: "string", |
| 315 | Description: "The method to execute", |
| 316 | Enum: []any{ |
| 317 | projectsMethodGetProject, |
| 318 | projectsMethodGetProjectField, |
| 319 | projectsMethodGetProjectItem, |
| 320 | projectsMethodGetProjectStatusUpdate, |
| 321 | }, |
| 322 | }, |
| 323 | "owner_type": { |
| 324 | Type: "string", |
| 325 | Description: "Owner type (user or org). If not provided, will be automatically detected.", |
| 326 | Enum: []any{"user", "org"}, |
| 327 | }, |
| 328 | "owner": { |
| 329 | Type: "string", |
| 330 | Description: "The owner (user or organization login). The name is not case sensitive.", |
| 331 | }, |
| 332 | "project_number": { |
| 333 | Type: "number", |
| 334 | Description: "The project's number.", |
| 335 | }, |
| 336 | "field_id": { |
| 337 | Type: "number", |
| 338 | Description: "The field's ID. Required for 'get_project_field' method.", |
| 339 | }, |
| 340 | "item_id": { |
| 341 | Type: "number", |
| 342 | Description: "The item's ID. Required for 'get_project_item' method.", |
| 343 | }, |
| 344 | "fields": { |
| 345 | Type: "array", |
| 346 | Description: "Specific list of field IDs to include in the response when getting a project item (e.g. [\"102589\", \"985201\", \"169875\"]). If not provided, only the title field is included. Only used for 'get_project_item' method.", |
| 347 | Items: &jsonschema.Schema{ |
| 348 | Type: "string", |
| 349 | }, |
| 350 | }, |
| 351 | "status_update_id": { |
| 352 | Type: "string", |
| 353 | Description: "The node ID of the project status update. Required for 'get_project_status_update' method.", |
| 354 | }, |
| 355 | }, |