get_workflow
Retrieve detailed information about a specific GitHub Actions workflow by providing the repository owner, repository name, and workflow ID or filename.
Instructions
Get details of a specific workflow
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| owner | Yes | Repository owner | |
| repo | Yes | Repository name | |
| workflowId | Yes | The ID of the workflow or filename |
Implementation Reference
- src/tools/get-workflow.ts:5-21 (handler)The handler function for the 'get_workflow' tool, which retrieves workflow details using the Octokit API.const handleGetWorkflow: ToolHandler = async (args, octokit: Octokit) => { const { owner, repo, workflowId } = args; try { const response = await octokit.rest.actions.getWorkflow({ owner, repo, workflow_id: workflowId }); return response.data; } catch (error: any) { throw new WorkflowError(`Failed to get workflow: ${error.message}`, error.response?.data); } }; export default handleGetWorkflow;
- src/tools/tool-definitions.ts:36-54 (schema)The input schema and definition for the 'get_workflow' tool.{ name: "get_workflow", description: "Get details of a specific workflow", inputSchema: { type: "object", properties: { owner: { type: "string", description: "Repository owner" }, repo: { type: "string", description: "Repository name" }, workflowId: { oneOf: [ { type: "string" }, { type: "number" } ], description: "The ID of the workflow or filename" } }, required: ["owner", "repo", "workflowId"] } },
- src/tools/index.ts:14-25 (registration)Registration of the 'get_workflow' handler in the toolHandlers map.export const toolHandlers: Record<string, ToolHandler> = { create_workflow: handleCreateWorkflow, list_workflows: handleListWorkflows, get_workflow: handleGetWorkflow, get_workflow_usage: handleGetWorkflowUsage, list_workflow_runs: handleListWorkflowRuns, get_workflow_run: handleGetWorkflowRun, get_workflow_run_jobs: handleGetWorkflowRunJobs, trigger_workflow: handleTriggerWorkflow, cancel_workflow_run: handleCancelWorkflowRun, rerun_workflow: handleRerunWorkflow, };