Skip to main content
Glama
hyunhoonj

Youth Activity Information MCP Server

by hyunhoonj

get_facility_group_list

Retrieve youth facility group lists with filters for region, institution name, and type to find youth activity programs in South Korea.

Instructions

청소년 시설 그룹 목록을 조회합니다. 시도, 기관명, 기관유형으로 필터링 가능합니다

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNoNo페이지 번호 (기본값: 1)
numOfRowsNo한 페이지 결과 수 (기본값: 10)
sidoNo시도명 (선택사항)
stNameNo기관명 (선택사항)
gNameNo기관유형명 (선택사항)

Implementation Reference

  • MCP tool handler case for 'get_facility_group_list': extracts parameters from tool call, invokes the YouthApiClient method, formats the paginated results into a human-readable text response with details like facility name, institution, type, address, and phone.
    case "get_facility_group_list": {
      const params = {
        pageNo: (args?.pageNo as number) || 1,
        numOfRows: (args?.numOfRows as number) || 10,
        sido: args?.sido as string | undefined,
        stName: args?.stName as string | undefined,
        gName: args?.gName as string | undefined,
      };
    
      const result = await youthApiClient.getFacilityGroupList(params);
    
      let resultText = `🏢 청소년 시설 그룹 목록 (전체 ${result.totalCount}개)\n\n`;
    
      if (Array.isArray(result.items)) {
        result.items.forEach((item: any, index: number) => {
          const itemNum = (params.pageNo - 1) * params.numOfRows + index + 1;
          resultText += `${itemNum}. ${item.faciNm || "시설명 없음"}\n`;
          if (item.instlNm)
            resultText += `   기관명: ${item.instlNm}\n`;
          if (item.gNm)
            resultText += `   유형: ${item.gNm}\n`;
          if (item.rdnmadr)
            resultText += `   주소: ${item.rdnmadr}\n`;
          if (item.phoneNumber)
            resultText += `   전화: ${item.phoneNumber}\n`;
          resultText += "\n";
        });
      } else if (result.items) {
        resultText += `1. ${result.items.faciNm || "시설명 없음"}\n`;
        if (result.items.instlNm)
          resultText += `   기관명: ${result.items.instlNm}\n`;
        if (result.items.gNm)
          resultText += `   유형: ${result.items.gNm}\n`;
        resultText += "\n";
      } else {
        resultText += "검색된 시설이 없습니다.\n\n";
      }
    
      resultText += `페이지: ${params.pageNo}/${Math.ceil(
        result.totalCount / params.numOfRows
      )}`;
    
      return {
        content: [
          {
            type: "text",
            text: resultText,
          },
        ],
      };
    }
  • Core implementation of getFacilityGroupList in YouthApiClient: makes HTTP GET to '/getJltlsGrpList' endpoint with pagination and filter params, parses XML response using xml2js, validates resultCode, extracts totalCount and items, handles errors.
    async getFacilityGroupList(params: {
      pageNo?: number;
      numOfRows?: number;
      sido?: string; // 시도
      stName?: string; // 기관명
      gName?: string; // 기관유형명
    }): Promise<any> {
      try {
        const response = await this.client.get("/getJltlsGrpList", {
          params: {
            serviceKey: this.serviceKey,
            pageNo: params.pageNo || 1,
            numOfRows: params.numOfRows || 10,
            sido: params.sido,
            stName: params.stName,
            gName: params.gName,
          },
        });
    
        const parsedData = await this.parseXmlResponse(response.data);
    
        if (parsedData.response) {
          const header = parsedData.response.header;
          const body = parsedData.response.body;
    
          if (header?.resultCode !== "00") {
            throw new Error(
              `API 오류: ${header?.resultMsg || "알 수 없는 오류"}`
            );
          }
    
          return {
            totalCount: parseInt(body?.totalCount || "0"),
            items: body?.items?.item || [],
            pageNo: params.pageNo || 1,
            numOfRows: params.numOfRows || 10,
          };
        }
    
        throw new Error("예상치 못한 응답 형식");
      } catch (error) {
        if (axios.isAxiosError(error)) {
          throw new Error(
            `API 호출 실패: ${error.message}${
              error.response?.data ? ` - ${error.response.data}` : ""
            }`
          );
        }
        throw error;
      }
    }
  • src/index.ts:134-162 (registration)
    MCP tool registration in ListToolsRequestSchema handler: defines name 'get_facility_group_list', description, and inputSchema for parameters like pageNo, numOfRows, sido, stName, gName.
    {
      name: "get_facility_group_list",
      description: "청소년 시설 그룹 목록을 조회합니다. 시도, 기관명, 기관유형으로 필터링 가능합니다",
      inputSchema: {
        type: "object",
        properties: {
          pageNo: {
            type: "number",
            description: "페이지 번호 (기본값: 1)",
          },
          numOfRows: {
            type: "number",
            description: "한 페이지 결과 수 (기본값: 10)",
          },
          sido: {
            type: "string",
            description: "시도명 (선택사항)",
          },
          stName: {
            type: "string",
            description: "기관명 (선택사항)",
          },
          gName: {
            type: "string",
            description: "기관유형명 (선택사항)",
          },
        },
      },
    },
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 filtering capabilities but doesn't describe pagination behavior (implied by pageNo/numOfRows parameters), rate limits, authentication requirements, or what happens when no filters are applied. The description is insufficient for a read operation with pagination.

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 a single, efficient sentence that states the purpose and mentions filtering capabilities. It's appropriately concise and front-loaded with the main purpose, though it could be slightly more structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a read operation with 5 parameters and pagination, but no output schema and no annotations, the description is incomplete. It doesn't explain the return format, pagination behavior, or error conditions. The agent would need to infer too much from the parameter names alone.

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 5 parameters with descriptions. The description adds minimal value by mentioning three filtering options (sido, stName, gName) but doesn't provide additional context beyond what's in the schema. 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 verb ('조회합니다' - retrieves) and resource ('청소년 시설 그룹 목록' - youth facility group list), making the purpose understandable. It doesn't explicitly distinguish from siblings like get_sido_list or get_sigungu_list, but the resource specificity provides some differentiation.

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 mentions filtering capabilities but provides no guidance on when to use this tool versus alternatives like search_youth_activities. There's no mention of prerequisites, typical use cases, or comparison with sibling tools.

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/hyunhoonj/mcp-test'

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