Skip to main content
Glama
re171113-byte

Startup Helper MCP

analyze_commercial_area

Analyze commercial areas for startups by evaluating business density, saturation levels, and area characteristics based on location and business type.

Instructions

특정 위치의 상권을 분석합니다. 업종별 밀집도, 포화도, 상권 특성을 제공합니다. 카카오맵 데이터를 기반으로 합니다.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
locationYes분석할 위치 (예: 강남역, 홍대입구, 부산 서면)
business_typeYes창업 예정 업종 (예: 카페, 음식점, 편의점, 미용실)
radiusNo분석 반경 (m), 기본값: 500

Implementation Reference

  • The core handler function `analyzeCommercialArea` that performs commercial area analysis: gets coordinates, counts categories and competitors via Kakao API, computes metrics like saturation score, area type, characteristics, and recommendation.
    export async function analyzeCommercialArea(
      location: string,
      businessType: string,
      radius: number = 500
    ): Promise<ApiResult<CommercialAreaData>> {
      try {
        // 1. 위치 좌표 얻기
        const coords = await kakaoApi.getCoordinates(location);
        if (!coords) {
          return {
            success: false,
            error: {
              code: "LOCATION_NOT_FOUND",
              message: `입력하신 위치를 찾을 수 없습니다: ${location}`,
              suggestion: "강남역, 홍대입구 등 구체적인 지명을 입력해주세요.",
            },
          };
        }
    
        // 2. 업종별 업체 수 조회
        const categoryBreakdown = await kakaoApi.countByCategories(
          String(coords.lng),
          String(coords.lat),
          radius
        );
    
        // 3. 해당 업종 업체 검색
        const competitors = await kakaoApi.findCompetitors(
          businessType,
          location,
          radius,
          15
        );
        const sameCategoryCount = competitors.length;
    
        // 4. 분석 결과 계산
        const totalStores = Object.values(categoryBreakdown).reduce((a, b) => a + b, 0);
        const saturationScore = calculateSaturationScore(businessType, sameCategoryCount, totalStores);
        const areaType = estimateAreaType(categoryBreakdown);
        const characteristics = analyzeCharacteristics(categoryBreakdown, location);
        const recommendation = generateRecommendation(businessType, saturationScore, sameCategoryCount);
    
        return {
          success: true,
          data: {
            location: {
              name: location,
              address: location,
              coordinates: coords,
            },
            areaType,
            characteristics,
            density: {
              totalStores,
              categoryBreakdown,
              sameCategoryCount,
              saturationLevel: getSaturationLevel(saturationScore),
              saturationScore,
            },
            recommendation,
          },
          meta: {
            source: DATA_SOURCES.kakaoLocal,
            timestamp: new Date().toISOString(),
          },
        };
      } catch (error) {
        console.error("상권 분석 실패:", error);
    
        return {
          success: false,
          error: {
            code: "ANALYSIS_FAILED",
            message: `상권 분석 중 오류가 발생했습니다: ${error instanceof Error ? error.message : "Unknown error"}`,
            suggestion: "잠시 후 다시 시도해주세요.",
          },
        };
      }
    }
  • src/index.ts:24-39 (registration)
    MCP server registration of the 'analyze_commercial_area' tool, including description, Zod input schema, and wrapper handler that calls the core function and formats response.
    server.tool(
      "analyze_commercial_area",
      "특정 위치의 상권을 분석합니다. 업종별 밀집도, 포화도, 상권 특성을 제공합니다. 카카오맵 데이터를 기반으로 합니다.",
      {
        location: z.string().describe("분석할 위치 (예: 강남역, 홍대입구, 부산 서면)"),
        business_type: z.string().describe("창업 예정 업종 (예: 카페, 음식점, 편의점, 미용실)"),
        radius: z.number().optional().default(500).describe("분석 반경 (m), 기본값: 500"),
      },
      async ({ location, business_type, radius }) => {
        const result = await analyzeCommercialArea(location, business_type, radius);
        return {
          content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
          isError: !result.success,
        };
      }
    );
  • TypeScript interface defining the structured output data for the commercial area analysis tool.
    export interface CommercialAreaData {
      location: Location;
      areaType: string;
      characteristics: string[];
      density: {
        totalStores: number;
        categoryBreakdown: Record<string, number>;
        sameCategoryCount: number;
        saturationLevel: string;
        saturationScore: number;
      };
      recommendation: string;
    }
  • Helper function to compute saturation score based on business type and competitor count relative to predefined optimal densities.
    function calculateSaturationScore(
      businessType: string,
      sameCategoryCount: number,
      _totalStores: number
    ): number {
      // 업종별 적정 개수 기준 (반경 500m 기준)
      const optimalCounts: Record<string, number> = {
        카페: 10,
        음식점: 20,
        편의점: 5,
        미용실: 8,
        default: 10,
      };
    
      const optimal = optimalCounts[businessType] || optimalCounts.default;
      const ratio = (sameCategoryCount / optimal) * 100;
    
      return Math.min(100, Math.round(ratio));
    }
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions the data source (Kakao Map) which adds some context, but doesn't describe what the analysis returns (format, structure), whether it's a read-only operation, potential rate limits, or authentication requirements. For a tool with 3 parameters and no annotations, this leaves significant behavioral gaps.

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?

The description is appropriately concise with three clear sentences. The first states the core function, the second lists outputs, and the third mentions data source. Each sentence adds value without redundancy. It could be slightly more front-loaded by combining purpose and outputs, but overall it's efficient.

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 tool with 3 parameters, 100% schema coverage, but no annotations and no output schema, the description is minimally adequate. It covers what the tool does and the data source, but doesn't explain what the analysis returns or behavioral aspects. Given the complexity of commercial area analysis, more context about output format and limitations would be helpful.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents all parameters thoroughly. The description doesn't add any parameter-specific information beyond what's in the schema descriptions. It mentions business type analysis generally, but doesn't provide additional context about parameter usage or constraints. Baseline 3 is appropriate when schema does the heavy lifting.

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: analyzing commercial areas with specific outputs (density by business type, saturation, characteristics). It uses specific verbs ('분석합니다', '제공합니다') and identifies the resource (commercial area at a specific location). However, it doesn't explicitly differentiate from sibling tools like 'find_competitors' or 'get_business_trends' which might have overlapping domains.

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 doesn't mention prerequisites, compare with sibling tools like 'find_competitors' (which might focus on competitors rather than area analysis), or specify scenarios where this analysis is most appropriate. The only contextual hint is the data source (Kakao Map).

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/re171113-byte/startup-helper-mcp'

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