Skip to main content
Glama

Gitea: Search code

gitea_search_code
Read-only

Search code across a Gitea instance or narrow results to a specific repository using owner and repo, with pagination for reviewing matches.

Instructions

[UNIFIED] Search code inside Gitea. When owner and repo are set, the search scopes to that repository; otherwise it's an instance-wide code search. Returns Gitea's raw {ok, data: [...]} shape.

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": {
      "site": "<site>",
      "keyword": "<keyword>"
    },
    "name": "gitea_search_code"
  }
}

Input Schema

NameRequiredDescriptionDefault
pageNo
repoNo
siteYes
ownerNo
keywordYes
per_pageNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv3.14.0

TDQS

B3.4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true, so the safety profile is known. The description usefully adds the return envelope ('{ok, data: [...]}') since there is no output schema, but says nothing about authentication requirements, result caps, pagination behavior, or ranking/sort, which matter for a search endpoint.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three short sentences, scope rule front-loaded, no filler. The '[UNIFIED]' prefix and markdown backticks are minor noise that does not impede comprehension.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a six-parameter search tool with no parameter descriptions and no output schema, the definition covers the most important scoping decision and the return shape, but leaves half the parameters and all pagination semantics unexplained.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description carries the burden, yet only clarifies the owner/repo interaction. 'site', 'page', and 'per_page' get no explanation, and the interaction between owner-without-repo is left ambiguous.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource ('Search code inside Gitea') and immediately qualifies scope: repo-scoped when owner/repo are set, instance-wide otherwise. The 'code' resource distinguishes it from search siblings like gitea_search_users, though no sibling is named explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives a clear conditional rule — set owner and repo for a repository-scoped search, omit them for an instance-wide search — which is exactly the decision an agent faces when calling it. It stops short of naming alternatives or stating exclusions (e.g., when a full-text listing tool would be preferable).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools