Skip to main content
Glama
jezweb

Smart Prompts MCP Server

check_github_status

Verify GitHub connection status and write access to ensure GitHub operations are available for prompt management workflows.

Instructions

Check GitHub connection status and write access. Use this to verify GitHub operations are available.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Main handler for check_github_status tool. Validates GitHub config, checks write access, and returns formatted status report.
    private async handleCheckGitHubStatus(): Promise<CallToolResult> {
      const configValid = await this.githubOps.validateConfig();
      const hasAccess = await this.githubOps.hasWriteAccess();
      
      const text = `# GitHub Status\n\n` +
        `**Configuration Valid:** ${configValid ? '✅ Yes' : '❌ No'}\n` +
        `**Write Access:** ${hasAccess ? '✅ Yes' : '❌ No (read-only)'}\n` +
        `**Repository:** ${configValid ? 'Connected' : 'Not accessible'}\n\n` +
        (hasAccess 
          ? 'You can create and update prompts in GitHub.' 
          : 'You can only read prompts. To enable writing:\n1. Set GITHUB_TOKEN environment variable\n2. Ensure token has "repo" scope\n3. Restart the server');
      
      return {
        content: [
          {
            type: 'text',
            text,
          } as TextContent,
        ],
      };
    }
  • Tool registration in getToolDefinitions(), including name, description, and empty input schema.
      name: 'check_github_status',
      description: 'Check GitHub connection status and write access. Use this to verify GitHub operations are available.',
      inputSchema: {
        type: 'object',
        properties: {},
      },
    },
  • Helper method to validate GitHub repository configuration by attempting to fetch repo info.
    async validateConfig(): Promise<boolean> {
      try {
        await this.octokit.repos.get({
          owner: this.config.owner,
          repo: this.config.repo,
        });
        return true;
      } catch (error) {
        console.error('GitHub configuration validation failed:', error);
        return false;
      }
    }
  • Helper method to check if the authenticated user has write (push) permissions to the repository.
    async hasWriteAccess(): Promise<boolean> {
      try {
        if (!this.config.token) {
          return false;
        }
    
        const { data: repo } = await this.octokit.repos.get({
          owner: this.config.owner,
          repo: this.config.repo,
        });
    
        // Check if the authenticated user has push access
        return repo.permissions?.push || false;
      } catch (error) {
        console.error('Error checking write access:', error);
        return false;
      }
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It mentions checking 'connection status and write access,' which implies it performs read operations to verify permissions, but it doesn't disclose behavioral traits like what happens on failure, whether it requires authentication, rate limits, or what the output looks like. This is a significant gap for a tool with no annotation coverage.

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

Conciseness5/5

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

The description is two concise sentences with zero waste. The first sentence states the purpose, and the second provides usage guidance, making it front-loaded and efficient. Every sentence earns its place by adding clear value.

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?

Given the tool's low complexity (0 parameters, no output schema, no annotations), the description is somewhat complete but lacks depth. It explains what the tool does and when to use it, but without annotations or output schema, it should ideally disclose more about behavior (e.g., what 'write access' means, response format). It's adequate but has clear gaps.

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

Parameters4/5

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

The tool has 0 parameters, and schema description coverage is 100%, so there's no need for parameter details in the description. The baseline for 0 parameters is 4, as the description doesn't need to compensate for any missing schema information, and it appropriately avoids unnecessary parameter discussion.

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?

The description clearly states the tool's purpose: 'Check GitHub connection status and write access.' It specifies both the verb ('Check') and the resources ('GitHub connection status and write access'), making it easy to understand what the tool does. However, it doesn't explicitly differentiate from sibling tools, which are mostly prompt-related, so it doesn't reach a 5.

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?

The description provides clear context for when to use this tool: 'Use this to verify GitHub operations are available.' This gives a specific scenario (verifying availability before operations) and implies it's a prerequisite check. It doesn't mention when not to use it or name alternatives, so it's not a full 5.

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

Install Server

Other Tools

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/jezweb/smart-prompts-mcp'

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