Skip to main content
Glama

gitea_context_get

Retrieve the current default context (owner, repository, organization, project) for Gitea repository operations.

Instructions

Get current default context (owner, repo, org, project)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • src/index.ts:483-500 (registration)
    Registration of the 'gitea_context_get' tool using mcpServer.registerTool, including title, description, and the inline handler function that retrieves and returns the current context as JSON.
    mcpServer.registerTool( 'gitea_context_get', { title: '获取当前上下文', description: 'Get current default context (owner, repo, org, project)', }, async (_args: any, _extra: any) => { const context = ctx.contextManager.getContext(); return { content: [ { type: 'text' as const, text: JSON.stringify(context, null, 2), }, ], }; } );
  • The core handler function for 'gitea_context_get' that gets the current context from ctx.contextManager and serializes it to JSON in the tool response.
    async (_args: any, _extra: any) => { const context = ctx.contextManager.getContext(); return { content: [ { type: 'text' as const, text: JSON.stringify(context, null, 2), }, ], }; }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/SupenBysz/gitea-mcp-tool'

If you have feedback or need assistance with the MCP directory API, please join our Discord server