get_workflow
Retrieve detailed information about a specific GitHub Actions workflow by providing the repository owner, repository name, and workflow ID or filename.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"owner": "<owner>",
"repo": "<repo>",
"workflowId": "<workflowId>"
},
"name": "get_workflow"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| owner | Yes | Repository owner (username or organization) | |
| repo | Yes | Repository name | |
| workflowId | Yes | The ID of the workflow or filename (string or number) |
Implementation Reference
- src/operations/actions.ts:110-121 (handler)The main handler function that fetches the workflow details from the GitHub API using githubRequest and parses the response with WorkflowSchema.
export async function getWorkflow( owner: string, repo: string, workflowId: string | number ) { owner = validateOwnerName(owner); repo = validateRepositoryName(repo); const url = `https://api.github.com/repos/${owner}/${repo}/actions/workflows/${workflowId}`; const response = await githubRequest(url); return WorkflowSchema.parse(response); } - src/operations/actions.ts:25-29 (schema)Zod schema defining the input parameters for the get_workflow tool: owner, repo, workflowId.
export const GetWorkflowSchema = z.object({ owner: z.string().describe("Repository owner (username or organization)"), repo: z.string().describe("Repository name"), workflowId: z.string().describe("The ID of the workflow or filename (string or number)"), }); - src/index.ts:160-166 (registration)MCP server tool registration for 'get_workflow', providing the schema and a wrapper handler that calls actions.getWorkflow and returns JSON stringified result.
"get_workflow", actions.GetWorkflowSchema.shape, async (request: any) => { const result = await actions.getWorkflow(request.owner, request.repo, request.workflowId); return { content: [{ type: "text", text: JSON.stringify(result) }] }; } );