|
|
@@ -641,6 +641,20 @@ export function createMcpServer(gogsClient: GogsClient, restrictedOwner?: string
|
|
|
},
|
|
|
},
|
|
|
},
|
|
|
+ {
|
|
|
+ name: 'list_organization_repositories',
|
|
|
+ description: 'List Gogs repositories for an organization',
|
|
|
+ inputSchema: {
|
|
|
+ type: 'object',
|
|
|
+ properties: {
|
|
|
+ orgname: {
|
|
|
+ type: 'string',
|
|
|
+ description: 'Organization name',
|
|
|
+ },
|
|
|
+ },
|
|
|
+ required: ['orgname'],
|
|
|
+ },
|
|
|
+ },
|
|
|
{
|
|
|
name: 'search_repositories',
|
|
|
description: 'Search for Gogs repositories',
|
|
|
@@ -2558,6 +2572,19 @@ export function createMcpServer(gogsClient: GogsClient, restrictedOwner?: string
|
|
|
};
|
|
|
}
|
|
|
|
|
|
+ case 'list_organization_repositories': {
|
|
|
+ const orgname = z.object({ orgname: z.string() }).parse(args).orgname;
|
|
|
+ const repos = await gogsClient.listOrganizationRepositories(orgname);
|
|
|
+ return {
|
|
|
+ content: [
|
|
|
+ {
|
|
|
+ type: 'text',
|
|
|
+ text: JSON.stringify(repos, null, 2),
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ };
|
|
|
+ }
|
|
|
+
|
|
|
case 'search_repositories': {
|
|
|
const { query, uid, limit, page } = SearchReposSchema.parse(args);
|
|
|
const repos = await gogsClient.searchRepositories(query, { uid, limit, page });
|