add_topic
Add a single topic to a repository. The operation is idempotent, so adding an existing topic has no effect. The topic must be lowercase letters, digits, and hyphens, starting with a letter or digit.
Instructions
Add ONE topic to a repository by name. Idempotent: adding an existing topic does not error. Topic name: lowercase letters, digits, and hyphens, starting with a letter/digit. To add several topics at once or to set the exact desired set, prefer replace_topics.
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": {
"topic": "<topic>"
},
"name": "add_topic"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo | No | Repository name (defaults to GITEA_DEFAULT_REPO) | |
| owner | No | Repository owner (defaults to GITEA_DEFAULT_OWNER) | |
| topic | Yes | Topic name to add. Lowercase letters, digits, and hyphens; must start with a letter or digit. |