Hatchyard

Template

Web app with a database

Verified

by Hatch Work

A small web app backed by its own PostgreSQL database, with its code in Git, a build and scan on every change, and blue/green releases to a public address.

Use this when A web app that keeps its data in its own PostgreSQL database.

web-appdatabasebuild-stepblue-green

What it sets up

The stack Web app with a database gives you: the gateway your AI connects to, the platform tools it runs on and the parts it adds.

Gateway · comes with every stack 57 AI tools Gateway 57 tools comes with every stack YOUR AI CONNECTS HERE Registry · will be installed if missing No AI tools of its own. Registry will be installed if missing PLATFORM · PRIVATE Jenkins · will be installed if missing 6 AI tools Jenkins will be installed if missing PLATFORM · PRIVATE Gitea · will be installed if missing 36 AI tools Gitea will be installed if missing PLATFORM · PRIVATE ArgoCD · will be installed if missing 11 AI tools ArgoCD will be installed if missing PLATFORM · PRIVATE Argo Rollouts · will be installed if missing No AI tools of its own. Argo Rollouts will be installed if missing PLATFORM · PRIVATE Your app · will be created No AI tools of its own. Your app will be created APP · PUBLIC PostgreSQL · will be created No AI tools of its own. PostgreSQL will be created SERVICE · PRIVATE db webhook images repository 4 app tools 6 tools 36 tools 11 tools

Building blocks

  • Starter repository repository

    The starter code, pushed to your Gitea. It is yours: edit it, and every push is built, scanned and deployed.

  • PostgreSQL database

    Its own copy for this install, not shared, removed with it.

  • Your app app

    Built from your repository by Jenkins and deployed by ArgoCD, only into this install's namespace. It gets a public address.

No screenshots: Web app with a database has no screen of its own. Apps use it behind the scenes.

What it can access

Worked out from the template, not taken from the publisher's word.

  • InstallsStarter repository repository. The starter code, pushed to your Gitea. It is yours: edit it, and every push is built, scanned and deployed.
    PostgreSQL database. Its own copy for this install, not shared, removed with it.
    Your app app. Built from your repository by Jenkins and deployed by ArgoCD, only into this install's namespace. It gets a public address.
  • Your credentialsNone. It asks for no keys or passwords of yours.
  • Internet-facingYour code: built and deployed only into this install's own namespace, at the address the template names.
    PostgreSQL: no, only reachable inside the stack
  • NetworkCan reach the internet. Cannot reach your other apps, the cluster's services, private networks or the cloud metadata address.
  • Data it keepsYour code: in its own repository in your Gitea.
    PostgreSQL: /var/lib/postgresql/data, 2 GB on small, 10 GB on medium, 50 GB on large (makes its own password, kept in the secret store)
  • AI tools57 tools, each listed with its inputs under Tools your AI gets. A key only reaches the ones its rights open.

Security

What runs, and how it is fenced in.

Verified: reviewed by Hatch Work and shipped inside this Hatchyard release. It runs the project's own image, pinned by digest, as its own non-root user.

  • PostgreSQL docker.io/library/postgres:17.12
    Pinned by digest sha256:97fb53376be3…
    Not scanned yet No scan of this digest is recorded; release CI will add a Trivy result here.
    Runs as uid 999 Read-only filesystem
  • Your codeEvery push is built on your stack and scanned before it deploys; a critical finding stops the deploy.
  • Every appEvery Linux capability dropped, no privilege escalation, seccomp on, no Kubernetes token, CPU and memory limits, its own namespace.

Setup

Automatic: Hatchyard does the first-run setup.

  • Starter codeInstall pushes the starter code to a new repository in your Gitea, sets up its build and deploy, and deploys the first build. Every push after that is built, scanned and deployed.
  • Platform toolsGitea, Jenkins, ArgoCD, Argo Rollouts are installed first if the stack does not have them yet.
  • PostgreSQLNo first-run setup: it is ready when it starts.
  • Asked at installSite title: The title on the page. Default: Guest book

Tools your AI gets

57 tools, 28 read, 29 write

Your AI reaches these through the stack's AI gateway, at one MCP address. Each key gets only the rights you tick on Connect your AI, and every call is logged.

Least privilege: the key Hatchyard makes to set Web app with a database up may only argocd:deploy, argocd:read, gitea:read, gitea:write, and it stops working within 2 hours. Each group below says whether that key holds its right.

Open a group to see its tools, their inputs and an example call.

Gitea · read

read needs gitea:read · 19 tools template key: yes

gitea.repo_getread

Get a repository

InputTypeRequiredDescription
ownerstringrequiredowner of the repo
repostringrequiredname of the repo
Example call
{
  "method": "tools/call",
  "params": {
    "name": "gitea.repo_get",
    "arguments": {
      "owner": "<owner>",
      "repo": "<repo>"
    }
  }
}

gitea.org_list_reposread

List an organization's repos

InputTypeRequiredDescription
orgstringrequiredname of the organization
limitintegeroptionalpage size of results
pageintegeroptionalpage number of results to return (1-based)
Example call
{
  "method": "tools/call",
  "params": {
    "name": "gitea.org_list_repos",
    "arguments": {
      "org": "<org>",
      "limit": 1,
      "page": 1
    }
  }
}

gitea.repo_list_branchesread

List a repository's branches

InputTypeRequiredDescription
ownerstringrequiredowner of the repo
repostringrequiredname of the repo
limitintegeroptionalpage size of results
pageintegeroptionalpage number of results to return (1-based)
Example call
{
  "method": "tools/call",
  "params": {
    "name": "gitea.repo_list_branches",
    "arguments": {
      "owner": "<owner>",
      "repo": "<repo>",
      "limit": 1,
      "page": 1
    }
  }
}

gitea.repo_get_contentsread

Gets the metadata and contents (if a file) of an entry in a repository, or a list of entries if a dir

InputTypeRequiredDescription
filepathstringrequiredpath of the dir, file, symlink or submodule in the repo
ownerstringrequiredowner of the repo
repostringrequiredname of the repo
refstringoptionalThe name of the commit/branch/tag. Default the repository’s default branch (usually master)
Example call
{
  "method": "tools/call",
  "params": {
    "name": "gitea.repo_get_contents",
    "arguments": {
      "filepath": "<filepath>",
      "owner": "<owner>",
      "repo": "<repo>",
      "ref": "<ref>"
    }
  }
}

gitea.repo_list_pull_requestsread

List a repo's pull requests

InputTypeRequiredDescription
ownerstringrequiredowner of the repo
repostringrequiredname of the repo
labelsarray of integer (int64)optionalLabel IDs
limitintegeroptionalpage size of results
milestoneinteger (int64)optionalID of the milestone
pageintegeroptionalpage number of results to return (1-based)
sortone of oldest, recentupdate, leastupdate, mostcomment, leastcomment, priorityoptionalType of sort
stateone of closed, open, alloptionalState of pull request: open or closed (optional)
Example call
{
  "method": "tools/call",
  "params": {
    "name": "gitea.repo_list_pull_requests",
    "arguments": {
      "owner": "<owner>",
      "repo": "<repo>",
      "labels": [1],
      "limit": 1,
      "milestone": 1,
      "page": 1,
      "sort": "oldest",
      "state": "closed"
    }
  }
}

gitea.repo_get_pull_requestread

Get a pull request

InputTypeRequiredDescription
indexinteger (int64)requiredindex of the pull request to get
ownerstringrequiredowner of the repo
repostringrequiredname of the repo
Example call
{
  "method": "tools/call",
  "params": {
    "name": "gitea.repo_get_pull_request",
    "arguments": {
      "index": 1,
      "owner": "<owner>",
      "repo": "<repo>"
    }
  }
}

gitea.issue_list_issuesread

List a repository's issues

InputTypeRequiredDescription
ownerstringrequiredowner of the repo
repostringrequiredname of the repo
assigned_bystringoptionalOnly show items for which the given user is assigned
beforestring (date-time)optionalOnly show items updated before the given time. This is a timestamp in RFC 3339 format
created_bystringoptionalOnly show items which were created by the given user
labelsstringoptionalcomma separated list of labels. Fetch only issues that have any of this labels. Non existent labels are discarded
limitintegeroptionalpage size of results
mentioned_bystringoptionalOnly show items in which the given user was mentioned
milestonesstringoptionalcomma separated list of milestone names or ids. It uses names and fall back to ids. Fetch only issues that have any of this milestones. Non existent milestones are discarded
pageintegeroptionalpage number of results to return (1-based)
qstringoptionalsearch string
sincestring (date-time)optionalOnly show items updated after the given time. This is a timestamp in RFC 3339 format
stateone of closed, open, alloptionalwhether issue is open or closed
typeone of issues, pullsoptionalfilter by type (issues / pulls) if set
Example call
{
  "method": "tools/call",
  "params": {
    "name": "gitea.issue_list_issues",
    "arguments": {
      "owner": "<owner>",
      "repo": "<repo>",
      "assigned_by": "<assigned_by>",
      "before": "<before>",
      "created_by": "<created_by>",
      "labels": "<labels>",
      "limit": 1,
      "mentioned_by": "<mentioned_by>",
      "milestones": "<milestones>",
      "page": 1,
      "q": "<q>",
      "since": "<since>",
      "state": "closed",
      "type": "issues"
    }
  }
}

gitea.issue_get_issueread

Get an issue

InputTypeRequiredDescription
indexinteger (int64)requiredindex of the issue to get
ownerstringrequiredowner of the repo
repostringrequiredname of the repo
Example call
{
  "method": "tools/call",
  "params": {
    "name": "gitea.issue_get_issue",
    "arguments": {
      "index": 1,
      "owner": "<owner>",
      "repo": "<repo>"
    }
  }
}

gitea.repo_get_contents_listread

Gets the metadata of all the entries of the root dir

InputTypeRequiredDescription
ownerstringrequiredowner of the repo
repostringrequiredname of the repo
refstringoptionalThe name of the commit/branch/tag. Default the repository’s default branch (usually master)
Example call
{
  "method": "tools/call",
  "params": {
    "name": "gitea.repo_get_contents_list",
    "arguments": {
      "owner": "<owner>",
      "repo": "<repo>",
      "ref": "<ref>"
    }
  }
}

gitea.get_treeread

Gets the tree of a repository.

InputTypeRequiredDescription
ownerstringrequiredowner of the repo
repostringrequiredname of the repo
shastringrequiredsha of the commit
pageintegeroptionalpage number; the 'truncated' field in the response will be true if there are still more items after this page, false if the last page
per_pageintegeroptionalnumber of items per page
recursivebooleanoptionalshow all directories and files
Example call
{
  "method": "tools/call",
  "params": {
    "name": "gitea.get_tree",
    "arguments": {
      "owner": "<owner>",
      "repo": "<repo>",
      "sha": "<sha>",
      "page": 1,
      "per_page": 1,
      "recursive": false
    }
  }
}

gitea.repo_get_raw_fileread

Get a file from a repository

InputTypeRequiredDescription
filepathstringrequiredfilepath of the file to get
ownerstringrequiredowner of the repo
repostringrequiredname of the repo
refstringoptionalThe name of the commit/branch/tag. Default the repository’s default branch (usually master)
Example call
{
  "method": "tools/call",
  "params": {
    "name": "gitea.repo_get_raw_file",
    "arguments": {
      "filepath": "<filepath>",
      "owner": "<owner>",
      "repo": "<repo>",
      "ref": "<ref>"
    }
  }
}

gitea.repo_get_all_commitsread

Get a list of all commits from a repository

InputTypeRequiredDescription
ownerstringrequiredowner of the repo
repostringrequiredname of the repo
filesbooleanoptionalinclude a list of affected files for every commit (disable for speedup, default 'true')
limitintegeroptionalpage size of results (ignored if used with 'path')
notstringoptionalcommits that match the given specifier will not be listed.
pageintegeroptionalpage number of results to return (1-based)
pathstringoptionalfilepath of a file/dir
shastringoptionalSHA or branch to start listing commits from (usually 'master')
statbooleanoptionalinclude diff stats for every commit (disable for speedup, default 'true')
verificationbooleanoptionalinclude verification for every commit (disable for speedup, default 'true')
Example call
{
  "method": "tools/call",
  "params": {
    "name": "gitea.repo_get_all_commits",
    "arguments": {
      "owner": "<owner>",
      "repo": "<repo>",
      "files": false,
      "limit": 1,
      "not": "<not>",
      "page": 1,
      "path": "<path>",
      "sha": "<sha>",
      "stat": false,
      "verification": false
    }
  }
}

gitea.repo_get_single_commitread

Get a single commit from a repository

InputTypeRequiredDescription
ownerstringrequiredowner of the repo
repostringrequiredname of the repo
shastringrequireda git ref or commit sha
filesbooleanoptionalinclude a list of affected files for every commit (disable for speedup, default 'true')
statbooleanoptionalinclude diff stats for every commit (disable for speedup, default 'true')
verificationbooleanoptionalinclude verification for every commit (disable for speedup, default 'true')
Example call
{
  "method": "tools/call",
  "params": {
    "name": "gitea.repo_get_single_commit",
    "arguments": {
      "owner": "<owner>",
      "repo": "<repo>",
      "sha": "<sha>",
      "files": false,
      "stat": false,
      "verification": false
    }
  }
}

gitea.repo_get_branchread

Retrieve a specific branch from a repository, including its effective branch protection

InputTypeRequiredDescription
branchstringrequiredbranch to get
ownerstringrequiredowner of the repo
repostringrequiredname of the repo
Example call
{
  "method": "tools/call",
  "params": {
    "name": "gitea.repo_get_branch",
    "arguments": {
      "branch": "<branch>",
      "owner": "<owner>",
      "repo": "<repo>"
    }
  }
}

gitea.list_forksread

List a repository's forks

InputTypeRequiredDescription
ownerstringrequiredowner of the repo
repostringrequiredname of the repo
limitintegeroptionalpage size of results
pageintegeroptionalpage number of results to return (1-based)
Example call
{
  "method": "tools/call",
  "params": {
    "name": "gitea.list_forks",
    "arguments": {
      "owner": "<owner>",
      "repo": "<repo>",
      "limit": 1,
      "page": 1
    }
  }
}

gitea.repo_get_pull_request_filesread

Get changed files for a pull request

InputTypeRequiredDescription
indexinteger (int64)requiredindex of the pull request to get
ownerstringrequiredowner of the repo
repostringrequiredname of the repo
limitintegeroptionalpage size of results
pageintegeroptionalpage number of results to return (1-based)
skip-tostringoptionalskip to given file
whitespaceone of ignore-all, ignore-change, ignore-eol, show-alloptionalwhitespace behavior
Example call
{
  "method": "tools/call",
  "params": {
    "name": "gitea.repo_get_pull_request_files",
    "arguments": {
      "index": 1,
      "owner": "<owner>",
      "repo": "<repo>",
      "limit": 1,
      "page": 1,
      "skip-to": "<skip-to>",
      "whitespace": "ignore-all"
    }
  }
}

gitea.repo_list_pull_reviewsread

List all reviews for a pull request

InputTypeRequiredDescription
indexinteger (int64)requiredindex of the pull request
ownerstringrequiredowner of the repo
repostringrequiredname of the repo
limitintegeroptionalpage size of results
pageintegeroptionalpage number of results to return (1-based)
Example call
{
  "method": "tools/call",
  "params": {
    "name": "gitea.repo_list_pull_reviews",
    "arguments": {
      "index": 1,
      "owner": "<owner>",
      "repo": "<repo>",
      "limit": 1,
      "page": 1
    }
  }
}

gitea.repo_get_combined_status_by_refread

Get a commit's combined status, by branch/tag/commit reference

InputTypeRequiredDescription
ownerstringrequiredowner of the repo
refstringrequiredname of branch/tag/commit
repostringrequiredname of the repo
limitintegeroptionalpage size of results
pageintegeroptionalpage number of results to return (1-based)
Example call
{
  "method": "tools/call",
  "params": {
    "name": "gitea.repo_get_combined_status_by_ref",
    "arguments": {
      "owner": "<owner>",
      "ref": "<ref>",
      "repo": "<repo>",
      "limit": 1,
      "page": 1
    }
  }
}

Gitea · write

write needs gitea:write · 14 tools template key: yes

gitea.create_org_repowrite

Create a repository in an organization

InputTypeRequiredDescription
orgstringrequiredname of organization
bodyobjectoptionalCreateRepoOption options when creating repository
body.namestringrequiredName of the repository to create
body.auto_initbooleanoptionalWhether the repository should be auto-initialized?
body.default_branchstringoptionalDefaultBranch of the repository (used when initializes and in template)
body.descriptionstringoptionalDescription of the repository to create
body.gitignoresstringoptionalGitignores to use
body.issue_labelsstringoptionalLabel-Set to use
body.licensestringoptionalLicense to use
body.object_format_nameone of sha1, sha256optionalObjectFormatName of the underlying git repository
body.privatebooleanoptionalWhether the repository is private
body.readmestringoptionalReadme of the repository to create
body.templatebooleanoptionalWhether the repository is template
body.trust_modelone of default, collaborator, committer, collaboratorcommitteroptionalTrustModel of the repository
Example call
{
  "method": "tools/call",
  "params": {
    "name": "gitea.create_org_repo",
    "arguments": {
      "org": "<org>",
      "body": {
        "name": "<name>",
        "auto_init": false,
        "default_branch": "<default_branch>",
        "description": "<description>",
        "gitignores": "<gitignores>",
        "issue_labels": "<issue_labels>",
        "license": "<license>",
        "object_format_name": "sha1",
        "private": false,
        "readme": "<readme>",
        "template": false,
        "trust_model": "default"
      }
    }
  }
}

gitea.create_current_user_repowrite

Create a repository

InputTypeRequiredDescription
bodyobjectoptionalCreateRepoOption options when creating repository
body.namestringrequiredName of the repository to create
body.auto_initbooleanoptionalWhether the repository should be auto-initialized?
body.default_branchstringoptionalDefaultBranch of the repository (used when initializes and in template)
body.descriptionstringoptionalDescription of the repository to create
body.gitignoresstringoptionalGitignores to use
body.issue_labelsstringoptionalLabel-Set to use
body.licensestringoptionalLicense to use
body.object_format_nameone of sha1, sha256optionalObjectFormatName of the underlying git repository
body.privatebooleanoptionalWhether the repository is private
body.readmestringoptionalReadme of the repository to create
body.templatebooleanoptionalWhether the repository is template
body.trust_modelone of default, collaborator, committer, collaboratorcommitteroptionalTrustModel of the repository
Example call
{
  "method": "tools/call",
  "params": {
    "name": "gitea.create_current_user_repo",
    "arguments": {
      "body": {
        "name": "<name>",
        "auto_init": false,
        "default_branch": "<default_branch>",
        "description": "<description>",
        "gitignores": "<gitignores>",
        "issue_labels": "<issue_labels>",
        "license": "<license>",
        "object_format_name": "sha1",
        "private": false,
        "readme": "<readme>",
        "template": false,
        "trust_model": "default"
      }
    }
  }
}

gitea.repo_create_filewrite

Create a file in a repository

InputTypeRequiredDescription
bodyobjectrequiredCreateFileOptions options for creating files Note: `author` and `committer` are optional (if only one is given, it will be used for the other, otherwise the authenticated user will be used)
body.contentstringrequiredcontent must be base64 encoded
body.authorobjectoptionalIdentity for a person's identity like an author or committer
body.branchstringoptionalbranch (optional) to base this file from. if not given, the default branch is used
body.committerobjectoptionalIdentity for a person's identity like an author or committer
body.datesobjectoptionalCommitDateOptions store dates for GIT_AUTHOR_DATE and GIT_COMMITTER_DATE
body.messagestringoptionalmessage (optional) for the commit of this file. if not supplied, a default message will be used
body.new_branchstringoptionalnew_branch (optional) will make a new branch from `branch` before creating the file
body.signoffbooleanoptionalAdd a Signed-off-by trailer by the committer at the end of the commit log message.
filepathstringrequiredpath of the file to create
ownerstringrequiredowner of the repo
repostringrequiredname of the repo
Example call
{
  "method": "tools/call",
  "params": {
    "name": "gitea.repo_create_file",
    "arguments": {
      "body": {
        "content": "<content>",
        "author": {
          "email": "<email>",
          "name": "<name>"
        },
        "branch": "<branch>",
        "committer": {
          "email": "<email>",
          "name": "<name>"
        },
        "dates": {
          "author": "<author>",
          "committer": "<committer>"
        },
        "message": "<message>",
        "new_branch": "<new_branch>",
        "signoff": false
      },
      "filepath": "<filepath>",
      "owner": "<owner>",
      "repo": "<repo>"
    }
  }
}

gitea.repo_update_filewrite

Update a file in a repository

InputTypeRequiredDescription
bodyobjectrequiredUpdateFileOptions options for updating files Note: `author` and `committer` are optional (if only one is given, it will be used for the other, otherwise the authenticated user will be used)
body.contentstringrequiredcontent must be base64 encoded
body.shastringrequiredsha is the SHA for the file that already exists
body.authorobjectoptionalIdentity for a person's identity like an author or committer
body.branchstringoptionalbranch (optional) to base this file from. if not given, the default branch is used
body.committerobjectoptionalIdentity for a person's identity like an author or committer
body.datesobjectoptionalCommitDateOptions store dates for GIT_AUTHOR_DATE and GIT_COMMITTER_DATE
body.from_pathstringoptionalfrom_path (optional) is the path of the original file which will be moved/renamed to the path in the URL
body.messagestringoptionalmessage (optional) for the commit of this file. if not supplied, a default message will be used
body.new_branchstringoptionalnew_branch (optional) will make a new branch from `branch` before creating the file
body.signoffbooleanoptionalAdd a Signed-off-by trailer by the committer at the end of the commit log message.
filepathstringrequiredpath of the file to update
ownerstringrequiredowner of the repo
repostringrequiredname of the repo
Example call
{
  "method": "tools/call",
  "params": {
    "name": "gitea.repo_update_file",
    "arguments": {
      "body": {
        "content": "<content>",
        "sha": "<sha>",
        "author": {
          "email": "<email>",
          "name": "<name>"
        },
        "branch": "<branch>",
        "committer": {
          "email": "<email>",
          "name": "<name>"
        },
        "dates": {
          "author": "<author>",
          "committer": "<committer>"
        },
        "from_path": "<from_path>",
        "message": "<message>",
        "new_branch": "<new_branch>",
        "signoff": false
      },
      "filepath": "<filepath>",
      "owner": "<owner>",
      "repo": "<repo>"
    }
  }
}

gitea.repo_create_branchwrite

Create a branch

InputTypeRequiredDescription
ownerstringrequiredowner of the repo
repostringrequiredname of the repo
bodyobjectoptionalCreateBranchRepoOption options when creating a branch in a repository
body.new_branch_namestringrequiredName of the branch to create
body.old_branch_namestringoptionalDeprecated: true Name of the old branch to create from
body.old_ref_namestringoptionalName of the old branch/tag/commit to create from
Example call
{
  "method": "tools/call",
  "params": {
    "name": "gitea.repo_create_branch",
    "arguments": {
      "owner": "<owner>",
      "repo": "<repo>",
      "body": {
        "new_branch_name": "<new_branch_name>",
        "old_branch_name": "<old_branch_name>",
        "old_ref_name": "<old_ref_name>"
      }
    }
  }
}

gitea.repo_create_pull_requestwrite

Create a pull request

InputTypeRequiredDescription
ownerstringrequiredowner of the repo
repostringrequiredname of the repo
bodyobjectoptionalCreatePullRequestOption options when creating a pull request
body.assigneestringoptional
body.assigneesarray of stringoptional
body.basestringoptional
body.bodystringoptional
body.due_datestring (date-time)optional
body.headstringoptional
body.labelsarray of integer (int64)optional
body.milestoneinteger (int64)optional
body.titlestringoptional
Example call
{
  "method": "tools/call",
  "params": {
    "name": "gitea.repo_create_pull_request",
    "arguments": {
      "owner": "<owner>",
      "repo": "<repo>",
      "body": {
        "assignee": "<assignee>",
        "assignees": ["<assignees>"],
        "base": "<base>",
        "body": "<body>",
        "due_date": "<due_date>",
        "head": "<head>",
        "labels": [1],
        "milestone": 1,
        "title": "<title>"
      }
    }
  }
}

gitea.repo_merge_pull_requestwrite

Merge a pull request

InputTypeRequiredDescription
indexinteger (int64)requiredindex of the pull request to merge
ownerstringrequiredowner of the repo
repostringrequiredname of the repo
bodyobjectoptionalMergePullRequestForm form for merging Pull Request
body.Doone of merge, rebase, rebase-merge, squash, fast-forward-only, manually-mergedrequired
body.MergeCommitIDstringoptional
body.MergeMessageFieldstringoptional
body.MergeTitleFieldstringoptional
body.delete_branch_after_mergebooleanoptional
body.force_mergebooleanoptional
body.head_commit_idstringoptional
body.merge_when_checks_succeedbooleanoptional
Example call
{
  "method": "tools/call",
  "params": {
    "name": "gitea.repo_merge_pull_request",
    "arguments": {
      "index": 1,
      "owner": "<owner>",
      "repo": "<repo>",
      "body": {
        "Do": "merge",
        "MergeCommitID": "<MergeCommitID>",
        "MergeMessageField": "<MergeMessageField>",
        "MergeTitleField": "<MergeTitleField>",
        "delete_branch_after_merge": false,
        "force_merge": false,
        "head_commit_id": "<head_commit_id>",
        "merge_when_checks_succeed": false
      }
    }
  }
}

gitea.issue_create_issuewrite

Create an issue. If using deadline only the date will be taken into account, and time of day ignored.

InputTypeRequiredDescription
ownerstringrequiredowner of the repo
repostringrequiredname of the repo
bodyobjectoptionalCreateIssueOption options to create one issue
body.titlestringrequired
body.assigneestringoptionaldeprecated
body.assigneesarray of stringoptional
body.bodystringoptional
body.closedbooleanoptional
body.due_datestring (date-time)optional
body.labelsarray of integer (int64)optionallist of label ids
body.milestoneinteger (int64)optionalmilestone id
body.refstringoptional
Example call
{
  "method": "tools/call",
  "params": {
    "name": "gitea.issue_create_issue",
    "arguments": {
      "owner": "<owner>",
      "repo": "<repo>",
      "body": {
        "title": "<title>",
        "assignee": "<assignee>",
        "assignees": ["<assignees>"],
        "body": "<body>",
        "closed": false,
        "due_date": "<due_date>",
        "labels": [1],
        "milestone": 1,
        "ref": "<ref>"
      }
    }
  }
}

gitea.issue_create_commentwrite

Add a comment to an issue

InputTypeRequiredDescription
indexinteger (int64)requiredindex of the issue
ownerstringrequiredowner of the repo
repostringrequiredname of the repo
bodyobjectoptionalCreateIssueCommentOption options for creating a comment on an issue
body.bodystringrequired
Example call
{
  "method": "tools/call",
  "params": {
    "name": "gitea.issue_create_comment",
    "arguments": {
      "index": 1,
      "owner": "<owner>",
      "repo": "<repo>",
      "body": {
        "body": "<body>"
      }
    }
  }
}

gitea.repo_change_fileswrite

Modify multiple files in a repository

InputTypeRequiredDescription
bodyobjectrequiredChangeFilesOptions options for creating, updating or deleting multiple files Note: `author` and `committer` are optional (if only one is given, it will be used for the other, otherwise the authenticated user will be used)
body.filesarray of objectrequiredlist of file operations
body.authorobjectoptionalIdentity for a person's identity like an author or committer
body.branchstringoptionalbranch (optional) to base this file from. if not given, the default branch is used
body.committerobjectoptionalIdentity for a person's identity like an author or committer
body.datesobjectoptionalCommitDateOptions store dates for GIT_AUTHOR_DATE and GIT_COMMITTER_DATE
body.messagestringoptionalmessage (optional) for the commit of this file. if not supplied, a default message will be used
body.new_branchstringoptionalnew_branch (optional) will make a new branch from `branch` before creating the file
body.signoffbooleanoptionalAdd a Signed-off-by trailer by the committer at the end of the commit log message.
ownerstringrequiredowner of the repo
repostringrequiredname of the repo
Example call
{
  "method": "tools/call",
  "params": {
    "name": "gitea.repo_change_files",
    "arguments": {
      "body": {
        "files": [{}],
        "author": {
          "email": "<email>",
          "name": "<name>"
        },
        "branch": "<branch>",
        "committer": {
          "email": "<email>",
          "name": "<name>"
        },
        "dates": {
          "author": "<author>",
          "committer": "<committer>"
        },
        "message": "<message>",
        "new_branch": "<new_branch>",
        "signoff": false
      },
      "owner": "<owner>",
      "repo": "<repo>"
    }
  }
}

gitea.repo_delete_filewrite

Delete a file in a repository

InputTypeRequiredDescription
bodyobjectrequiredDeleteFileOptions options for deleting files (used for other File structs below) Note: `author` and `committer` are optional (if only one is given, it will be used for the other, otherwise the authenticated user will be used)
body.shastringrequiredsha is the SHA for the file that already exists
body.authorobjectoptionalIdentity for a person's identity like an author or committer
body.branchstringoptionalbranch (optional) to base this file from. if not given, the default branch is used
body.committerobjectoptionalIdentity for a person's identity like an author or committer
body.datesobjectoptionalCommitDateOptions store dates for GIT_AUTHOR_DATE and GIT_COMMITTER_DATE
body.messagestringoptionalmessage (optional) for the commit of this file. if not supplied, a default message will be used
body.new_branchstringoptionalnew_branch (optional) will make a new branch from `branch` before creating the file
body.signoffbooleanoptionalAdd a Signed-off-by trailer by the committer at the end of the commit log message.
filepathstringrequiredpath of the file to delete
ownerstringrequiredowner of the repo
repostringrequiredname of the repo
Example call
{
  "method": "tools/call",
  "params": {
    "name": "gitea.repo_delete_file",
    "arguments": {
      "body": {
        "sha": "<sha>",
        "author": {
          "email": "<email>",
          "name": "<name>"
        },
        "branch": "<branch>",
        "committer": {
          "email": "<email>",
          "name": "<name>"
        },
        "dates": {
          "author": "<author>",
          "committer": "<committer>"
        },
        "message": "<message>",
        "new_branch": "<new_branch>",
        "signoff": false
      },
      "filepath": "<filepath>",
      "owner": "<owner>",
      "repo": "<repo>"
    }
  }
}

gitea.create_forkwrite

Fork a repository

InputTypeRequiredDescription
ownerstringrequiredowner of the repo to fork
repostringrequiredname of the repo to fork
bodyobjectoptionalCreateForkOption options for creating a fork
body.namestringoptionalname of the forked repository
body.organizationstringoptionalorganization name, if forking into an organization
Example call
{
  "method": "tools/call",
  "params": {
    "name": "gitea.create_fork",
    "arguments": {
      "owner": "<owner>",
      "repo": "<repo>",
      "body": {
        "name": "<name>",
        "organization": "<organization>"
      }
    }
  }
}

gitea.repo_create_pull_reviewwrite

Create a review to an pull request

InputTypeRequiredDescription
bodyobjectrequiredCreatePullReviewOptions are options to create a pull review
body.bodystringoptional
body.commentsarray of objectoptional
body.commit_idstringoptional
body.eventstringoptionalReviewStateType review state type
indexinteger (int64)requiredindex of the pull request
ownerstringrequiredowner of the repo
repostringrequiredname of the repo
Example call
{
  "method": "tools/call",
  "params": {
    "name": "gitea.repo_create_pull_review",
    "arguments": {
      "body": {
        "body": "<body>",
        "comments": [{}],
        "commit_id": "<commit_id>",
        "event": "<event>"
      },
      "index": 1,
      "owner": "<owner>",
      "repo": "<repo>"
    }
  }
}

gitea.repo_edit_pull_requestwrite

Update a pull request. If using deadline only the date will be taken into account, and time of day ignored.

InputTypeRequiredDescription
indexinteger (int64)requiredindex of the pull request to edit
ownerstringrequiredowner of the repo
repostringrequiredname of the repo
bodyobjectoptionalEditPullRequestOption options when modify pull request
body.allow_maintainer_editbooleanoptional
body.assigneestringoptional
body.assigneesarray of stringoptional
body.basestringoptional
body.bodystringoptional
body.due_datestring (date-time)optional
body.labelsarray of integer (int64)optional
body.milestoneinteger (int64)optional
body.statestringoptional
body.titlestringoptional
body.unset_due_datebooleanoptional
Example call
{
  "method": "tools/call",
  "params": {
    "name": "gitea.repo_edit_pull_request",
    "arguments": {
      "index": 1,
      "owner": "<owner>",
      "repo": "<repo>",
      "body": {
        "allow_maintainer_edit": false,
        "assignee": "<assignee>",
        "assignees": ["<assignees>"],
        "base": "<base>",
        "body": "<body>",
        "due_date": "<due_date>",
        "labels": [1],
        "milestone": 1,
        "state": "<state>",
        "title": "<title>",
        "unset_due_date": false
      }
    }
  }
}

Gitea · admin

write needs gitea:admin · 3 tools template key: no

gitea.org_createwrite

Create an organization

InputTypeRequiredDescription
bodyobjectrequiredCreateOrgOption options for creating an organization
body.usernamestringrequired
body.descriptionstringoptional
body.emailstringoptional
body.full_namestringoptional
body.locationstringoptional
body.repo_admin_change_team_accessbooleanoptional
body.visibilityone of public, limited, privateoptionalpossible values are `public` (default), `limited` or `private`
body.websitestringoptional
Example call
{
  "method": "tools/call",
  "params": {
    "name": "gitea.org_create",
    "arguments": {
      "body": {
        "username": "<username>",
        "description": "<description>",
        "email": "<email>",
        "full_name": "<full_name>",
        "location": "<location>",
        "repo_admin_change_team_access": false,
        "visibility": "public",
        "website": "<website>"
      }
    }
  }
}

gitea.admin_create_userwrite

Create a user

InputTypeRequiredDescription
bodyobjectoptionalCreateUserOption create user options
body.emailstring (email)required
body.usernamestringrequired
body.created_atstring (date-time)optionalFor explicitly setting the user creation timestamp. Useful when users are migrated from other systems. When omitted, the user's creation timestamp will be set to "now".
body.full_namestringoptional
body.login_namestringoptional
body.must_change_passwordbooleanoptional
body.passwordstringoptional
body.restrictedbooleanoptional
body.send_notifybooleanoptional
body.source_idinteger (int64)optional
body.visibilitystringoptional
Example call
{
  "method": "tools/call",
  "params": {
    "name": "gitea.admin_create_user",
    "arguments": {
      "body": {
        "email": "<email>",
        "username": "<username>",
        "created_at": "<created_at>",
        "full_name": "<full_name>",
        "login_name": "<login_name>",
        "must_change_password": false,
        "password": "<password>",
        "restricted": false,
        "send_notify": false,
        "source_id": 1,
        "visibility": "<visibility>"
      }
    }
  }
}

gitea.repo_deletewrite

Delete a repository

InputTypeRequiredDescription
ownerstringrequiredowner of the repo to delete
repostringrequiredname of the repo to delete
Example call
{
  "method": "tools/call",
  "params": {
    "name": "gitea.repo_delete",
    "arguments": {
      "owner": "<owner>",
      "repo": "<repo>"
    }
  }
}

Jenkins · read

read needs jenkins:read · 4 tools template key: no

jenkins.jobs_listread

List the jobs Jenkins knows (audit, build) and whether their last run passed.

No inputs.

Example call
{
  "method": "tools/call",
  "params": {
    "name": "jenkins.jobs_list",
    "arguments": {}
  }
}

jenkins.builds_listread

Recent runs of a job, newest first, with their result.

InputTypeRequiredDescription
jobstringrequiredThe job: audit or build
Example call
{
  "method": "tools/call",
  "params": {
    "name": "jenkins.builds_list",
    "arguments": {
      "job": "<job>"
    }
  }
}

jenkins.build_statusread

One run of a job: result, how long it took, and what it was building.

InputTypeRequiredDescription
jobstringrequiredThe job: audit or build
numberintegerrequiredThe run number
Example call
{
  "method": "tools/call",
  "params": {
    "name": "jenkins.build_status",
    "arguments": {
      "job": "<job>",
      "number": 1
    }
  }
}

jenkins.build_logread

The console output of one run (the gateway returns at most 1 MiB).

InputTypeRequiredDescription
jobstringrequiredThe job: audit or build
numberintegerrequiredThe run number
Example call
{
  "method": "tools/call",
  "params": {
    "name": "jenkins.build_log",
    "arguments": {
      "job": "<job>",
      "number": 1
    }
  }
}

Jenkins · build

write needs jenkins:build · 2 tools template key: no

jenkins.build_startwrite

Start the build job for a commit and return its queue_id; the build pushes an image, scans it, and hands it to the repository's ArgoCD application (named <org>-<repo>, with dots and underscores as dashes, and created with source_repo) when the policy allows.

InputTypeRequiredDescription
REFstringrequiredrefs/heads/<branch>
REPO_FULL_NAMEstringrequiredorg/repo on the Gitea
SHAstringrequiredThe commit, 40 hex characters
contextstringoptionalThe build context, a relative directory inside the repository (default the repository root, or .hatchyard/pipeline.yaml)
dockerfilestringoptionalThe Dockerfile, a relative path inside the repository (default Dockerfile, or .hatchyard/pipeline.yaml)
Example call
{
  "method": "tools/call",
  "params": {
    "name": "jenkins.build_start",
    "arguments": {
      "REF": "<REF>",
      "REPO_FULL_NAME": "<REPO_FULL_NAME>",
      "SHA": "<SHA>",
      "context": "<context>",
      "dockerfile": "<dockerfile>"
    }
  }
}

jenkins.build_waitwrite

Wait up to timeout_seconds (default 50, at most 300) for a started build and return its result, build number and last 50 log lines, or state running, in which case call it again with the same id.

InputTypeRequiredDescription
jobstringoptionalThe job, default build; only with number
numberintegeroptionalA run number to wait for instead of a queue_id
queue_idintegeroptionalThe queue_id that build_start returned
timeout_secondsintegeroptionalSeconds to wait in this call, default 50, at most 300
Example call
{
  "method": "tools/call",
  "params": {
    "name": "jenkins.build_wait",
    "arguments": {
      "job": "<job>",
      "number": 1,
      "queue_id": 1,
      "timeout_seconds": 1
    }
  }
}

ArgoCD · read

read needs argocd:read · 3 tools template key: yes

argocd.app_listread

List the applications ArgoCD manages with their sync and health state.

No inputs.

Example call
{
  "method": "tools/call",
  "params": {
    "name": "argocd.app_list",
    "arguments": {}
  }
}

argocd.app_getread

One application in detail: where it deploys from, where to, and whether what runs matches the repository.

InputTypeRequiredDescription
namestringrequiredThe application name
Example call
{
  "method": "tools/call",
  "params": {
    "name": "argocd.app_get",
    "arguments": {
      "name": "<name>"
    }
  }
}

argocd.app_historyread

List an application's past deployments newest first with their ids, revisions and dates, and whether auto-sync is on.

InputTypeRequiredDescription
namestringrequiredThe application name
Example call
{
  "method": "tools/call",
  "params": {
    "name": "argocd.app_history",
    "arguments": {
      "name": "<name>"
    }
  }
}

ArgoCD · deploy

write needs argocd:deploy · 7 tools template key: yes

argocd.app_createwrite

Create an application that deploys a Git repository's manifests (plain YAML or kustomize) into a namespace, in a project whose destinations already allow that namespace (never the default project), with automatic sync on and pruning off.

InputTypeRequiredDescription
namestringrequiredA short name, lower-case letters, digits and dashes
namespacestringrequiredThe namespace to deploy into; the project must allow it
pathstringrequiredThe folder inside the repository, for example deploy
projectstringrequiredThe ArgoCD project that limits what the application may deploy. It must exist already, may not be the default project, and its destinations must already cover the namespace
repo_urlstringrequiredThe https Git URL of the repository with the manifests
revisionstringoptionalBranch or tag, default main
source_repostringoptionalThe Gitea repository whose pushes the Jenkins pipeline deploys to this application, as org/repo. The pipeline only updates an application marked with exactly its own repository and named <org>-<repo> (<org>-<repo>-<component> for a component), dots and underscores written as dashes. Leave it out for an application the pipeline must never touch.
Example call
{
  "method": "tools/call",
  "params": {
    "name": "argocd.app_create",
    "arguments": {
      "name": "<name>",
      "namespace": "<namespace>",
      "path": "<path>",
      "project": "<project>",
      "repo_url": "<repo_url>",
      "revision": "<revision>",
      "source_repo": "<source_repo>"
    }
  }
}

argocd.app_syncwrite

Tell ArgoCD to apply the repository's current state to the cluster now.

InputTypeRequiredDescription
namestringrequiredThe application name
Example call
{
  "method": "tools/call",
  "params": {
    "name": "argocd.app_sync",
    "arguments": {
      "name": "<name>"
    }
  }
}

argocd.deploy_and_waitwrite

Sync an application that exists and wait until it is healthy, up to timeout_seconds (default 50, at most 600); if the state is in progress, call it again with the same arguments. It never creates an application: make one first with app_create.

InputTypeRequiredDescription
namestringrequiredThe application name
timeout_secondsintegeroptionalSeconds to wait in this call, default 50, at most 600
Example call
{
  "method": "tools/call",
  "params": {
    "name": "argocd.deploy_and_wait",
    "arguments": {
      "name": "<name>",
      "timeout_seconds": 1
    }
  }
}

argocd.app_rollbackwrite

Redeploy an earlier deployment by its id from app_history; this switches auto-sync off for the application, which the result says. For an application with a blue/green Rollout this is the switch back; within 10 minutes of a switch the old version is still running and takes traffic again at once.

InputTypeRequiredDescription
idintegerrequiredThe deployment id from app_history
namestringrequiredThe application name
Example call
{
  "method": "tools/call",
  "params": {
    "name": "argocd.app_rollback",
    "arguments": {
      "id": 1,
      "name": "<name>"
    }
  }
}

argocd.app_autosyncwrite

Turn an application's automatic sync on or off; with it on, ArgoCD applies every new commit by itself.

InputTypeRequiredDescription
enabledbooleanrequiredtrue to turn auto-sync on, false to turn it off
namestringrequiredThe application name
Example call
{
  "method": "tools/call",
  "params": {
    "name": "argocd.app_autosync",
    "arguments": {
      "enabled": false,
      "name": "<name>"
    }
  }
}

argocd.app_promotewrite

Promote now: for an application that uses a blue/green Rollout, switch traffic to the new version without waiting for its automatic promotion (ArgoCD's promote-full action on the Rollout).

InputTypeRequiredDescription
namestringrequiredThe application name
rolloutstringoptionalThe Rollout's name, only needed when the application has more than one
Example call
{
  "method": "tools/call",
  "params": {
    "name": "argocd.app_promote",
    "arguments": {
      "name": "<name>",
      "rollout": "<rollout>"
    }
  }
}

argocd.app_abortwrite

Abort a rollout that is in progress: traffic stays on the version that was live and the new version is scaled down. It does nothing once the new version is live; use app_history and app_rollback to go back after that.

InputTypeRequiredDescription
namestringrequiredThe application name
rolloutstringoptionalThe Rollout's name, only needed when the application has more than one
Example call
{
  "method": "tools/call",
  "params": {
    "name": "argocd.app_abort",
    "arguments": {
      "name": "<name>",
      "rollout": "<rollout>"
    }
  }
}

ArgoCD · admin

write needs argocd:admin · 1 tools template key: no

argocd.app_deletewrite

Remove an application from ArgoCD. What it deployed stays in the cluster unless cascade is asked for; with cascade, the application is gone only once what it ran has stopped.

InputTypeRequiredDescription
namestringrequiredThe application name
cascadebooleanoptionalAlso delete what it deployed (default false)
Example call
{
  "method": "tools/call",
  "params": {
    "name": "argocd.app_delete",
    "arguments": {
      "name": "<name>",
      "cascade": false
    }
  }
}

apps · read

read needs apps:read · 2 tools template key: no

apps.listread

List the apps on this stack: name, recipe, version, size, state and addresses.

No inputs.

Example call
{
  "method": "tools/call",
  "params": {
    "name": "apps.list",
    "arguments": {}
  }
}

apps.getread

One app's state, addresses, recipe, size and settings, and which credentials are bound (never their values).

InputTypeRequiredDescription
namestringrequiredThe app's name
Example call
{
  "method": "tools/call",
  "params": {
    "name": "apps.get",
    "arguments": {
      "name": "<name>"
    }
  }
}

apps · deploy

write needs apps:deploy · 1 tools template key: no

apps.installwrite

Install an app from a recipe, or install again an app that was removed. Credentials are never passed here: a recipe that needs one installs only after a person binds it in the console.

InputTypeRequiredDescription
namestringrequiredThe app's name: lower-case letters, digits and dashes
recipestringrequiredThe recipe to install, such as uptime-kuma
configobjectoptionalThe recipe's settings, by name
sizeone of small, medium, largeoptionalHow much CPU, memory and disk it gets; small when left out
Example call
{
  "method": "tools/call",
  "params": {
    "name": "apps.install",
    "arguments": {
      "name": "<name>",
      "recipe": "<recipe>",
      "config": {},
      "size": "small"
    }
  }
}

apps · admin

write needs apps:admin · 1 tools template key: no

apps.removewrite

Remove an app. Its data is kept 7 days unless purge is true.

InputTypeRequiredDescription
namestringrequiredThe app's name
purgebooleanoptionalDelete the app's data at once instead of keeping it 7 days
Example call
{
  "method": "tools/call",
  "params": {
    "name": "apps.remove",
    "arguments": {
      "name": "<name>",
      "purge": false
    }
  }
}