Skip to main content
Glama

get-project-config

Retrieve the currently configured project ID from the MCP server to enable authentication system integration and framework-specific client code generation.

Instructions

현재 MCP 서버에 설정된 프로젝트 ID를 확인합니다.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The core handler function for the 'get-project-config' tool. It loads common documentation from the repository, constructs project setup messages based on projectId, formats the content with rules and guides, and returns it as a structured text response.
      async () => {
        // Common 문서 로드
        const commonDocs = docsRepository.getCommonDocs();
    
        // 프로젝트 설정 메시지
        let setupMessage = projectId
          ? `✅ **프로젝트 설정 완료**\n\nProject ID: ${projectId}\nAPI Endpoint: https://api.aiapp.link\nCookie Domain: .aiapp.link\n\n이 ID가 모든 예제 코드에 자동으로 적용됩니다.`
          : `⚠️ **Project ID가 설정되지 않았습니다**\n\nClaude Desktop 설정 예시:\n\`\`\`json\n{\n  "mcpServers": {\n    "baas-mcp": {\n      "command": "npx",\n      "args": ["-y", "@mbaas/baas-mcp@latest", "--project-id=your-actual-project-id"]\n    }\n  }\n}\n\`\`\`\n\n환경 변수 사용:\n\`\`\`json\n{\n  "mcpServers": {\n    "baas-mcp": {\n      "command": "npx",\n      "args": ["-y", "@mbaas/baas-mcp@latest"],\n      "env": {\n        "BAAS_PROJECT_ID": "your-actual-project-id"\n      }\n    }\n  }\n}\n\`\`\``;
    
        // Common 문서 내용 구성
        let commonDocsContent = '\n\n---\n\n# 📚 필수 구현 규칙\n\n**중요**: 아래 규칙들은 모든 BaaS API 구현 시 반드시 적용되어야 합니다.\n\n';
    
        if (commonDocs.length > 0) {
          commonDocs.forEach((doc, index) => {
            const title = doc.getTitle();
            const content = doc.getContent();
    
            commonDocsContent += `\n## ${index + 1}. ${title}\n\n`;
            commonDocsContent += content + '\n\n';
            commonDocsContent += '---\n';
          });
        } else {
          commonDocsContent += '⚠️ Common 문서를 로드할 수 없습니다.\n';
        }
    
        // 사용 안내 추가
        const usageGuide = `\n\n## 🚀 다음 단계\n\n1. **기능 검색**: \`search-documents\` 도구로 구현할 기능 검색\n   - 예: search-documents({keywords: ['로그인', 'React']})\n   - 예: search-documents({keywords: ['회원가입', 'validation']})\n\n2. **구현**: 위의 필수 규칙을 반드시 적용하여 코드 생성\n   ✅ credentials: 'include' 설정\n   ✅ result: "SUCCESS"/"FAIL" 응답 형식\n   ✅ 조건부 렌더링 사용 (display: none 금지)\n   ✅ HttpOnly 쿠키 자동 관리\n\n3. **검증**: 생성된 코드가 필수 규칙을 준수하는지 확인`;
    
        return {
          content: [{
            type: "text" as const,
            text: setupMessage + commonDocsContent + usageGuide
          }]
        };
      }
    );
  • src/server.ts:95-144 (registration)
    Registers the 'get-project-config' tool on the MCP server, including name, description, empty input schema, and inline handler reference.
      server.tool(
        "get-project-config",
        `BaaS MCP 초기 설정을 확인합니다.
    
    **중요**: 모든 기능 구현 전에 먼저 이 도구를 실행하여 다음을 확인하세요:
    1. 프로젝트 ID 설정 확인
    2. 필수 구현 규칙 로드 (보안, 에러 처리, 상태 관리)
    
    이 도구가 제공하는 필수 규칙은 모든 API 구현에 반드시 적용되어야 합니다.`,
        {
          type: "object" as const,
          properties: {}
        },
        async () => {
          // Common 문서 로드
          const commonDocs = docsRepository.getCommonDocs();
    
          // 프로젝트 설정 메시지
          let setupMessage = projectId
            ? `✅ **프로젝트 설정 완료**\n\nProject ID: ${projectId}\nAPI Endpoint: https://api.aiapp.link\nCookie Domain: .aiapp.link\n\n이 ID가 모든 예제 코드에 자동으로 적용됩니다.`
            : `⚠️ **Project ID가 설정되지 않았습니다**\n\nClaude Desktop 설정 예시:\n\`\`\`json\n{\n  "mcpServers": {\n    "baas-mcp": {\n      "command": "npx",\n      "args": ["-y", "@mbaas/baas-mcp@latest", "--project-id=your-actual-project-id"]\n    }\n  }\n}\n\`\`\`\n\n환경 변수 사용:\n\`\`\`json\n{\n  "mcpServers": {\n    "baas-mcp": {\n      "command": "npx",\n      "args": ["-y", "@mbaas/baas-mcp@latest"],\n      "env": {\n        "BAAS_PROJECT_ID": "your-actual-project-id"\n      }\n    }\n  }\n}\n\`\`\``;
    
          // Common 문서 내용 구성
          let commonDocsContent = '\n\n---\n\n# 📚 필수 구현 규칙\n\n**중요**: 아래 규칙들은 모든 BaaS API 구현 시 반드시 적용되어야 합니다.\n\n';
    
          if (commonDocs.length > 0) {
            commonDocs.forEach((doc, index) => {
              const title = doc.getTitle();
              const content = doc.getContent();
    
              commonDocsContent += `\n## ${index + 1}. ${title}\n\n`;
              commonDocsContent += content + '\n\n';
              commonDocsContent += '---\n';
            });
          } else {
            commonDocsContent += '⚠️ Common 문서를 로드할 수 없습니다.\n';
          }
    
          // 사용 안내 추가
          const usageGuide = `\n\n## 🚀 다음 단계\n\n1. **기능 검색**: \`search-documents\` 도구로 구현할 기능 검색\n   - 예: search-documents({keywords: ['로그인', 'React']})\n   - 예: search-documents({keywords: ['회원가입', 'validation']})\n\n2. **구현**: 위의 필수 규칙을 반드시 적용하여 코드 생성\n   ✅ credentials: 'include' 설정\n   ✅ result: "SUCCESS"/"FAIL" 응답 형식\n   ✅ 조건부 렌더링 사용 (display: none 금지)\n   ✅ HttpOnly 쿠키 자동 관리\n\n3. **검증**: 생성된 코드가 필수 규칙을 준수하는지 확인`;
    
          return {
            content: [{
              type: "text" as const,
              text: setupMessage + commonDocsContent + usageGuide
            }]
          };
        }
      );
  • Input schema for the 'get-project-config' tool, which takes no parameters (empty properties).
    {
      type: "object" as const,
      properties: {}
    },
  • Helper function to parse project ID from command line arguments or environment variable, used in the tool handler.
    function parseProjectId(): string | null {
      // 명령줄 인자 파싱
      const args = process.argv.slice(2);
      let projectId: string | null = null;
    
      // --project-id=value 형식 확인
      const projectIdArg = args.find(arg => arg.startsWith('--project-id='));
      if (projectIdArg) {
        projectId = projectIdArg.split('=')[1];
      } else {
        // --project-id value 형식 확인 (띄어쓰기)
        const projectIdIndex = args.findIndex(arg => arg === '--project-id');
        if (projectIdIndex !== -1 && args[projectIdIndex + 1]) {
          projectId = args[projectIdIndex + 1];
        }
      }
    
      // 환경 변수 확인 (우선순위: 명령줄 인자 > 환경변수)
      projectId = projectId || process.env.BAAS_PROJECT_ID || null;
    
      return projectId;
    }
Behavior3/5

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

Annotations are empty, so the description carries the full burden. It implies a read-only operation ('check'), but does not disclose behavioral traits such as authentication needs, rate limits, or what happens if no project ID is set. It adds minimal context beyond the basic action.

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 a single, efficient sentence that directly states the tool's purpose without unnecessary words. It is front-loaded and appropriately sized for a simple tool.

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 simplicity (0 parameters, no output schema, empty annotations), the description is adequate but lacks depth. It covers the basic purpose but does not provide context on return values or potential errors, which could be helpful for an agent despite the low complexity.

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 no parameter documentation is needed. The description does not add parameter details, but this is appropriate given the lack of parameters, earning a baseline score of 4.

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: '현재 MCP 서버에 설정된 프로젝트 ID를 확인합니다' translates to 'Check the project ID configured in the current MCP server.' This specifies the verb ('check') and resource ('project ID'), though it doesn't explicitly differentiate from sibling tools like get-document-by-id or search-documents, which focus on documents rather than configuration.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It does not mention any prerequisites, context for usage, or comparisons with sibling tools, leaving the agent to infer usage based on the purpose alone.

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/mbaas-inc/BaaS-MCP'

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