Skip to main content
Glama
TeeDDub

Aladin Book Search MCP Server

by TeeDDub

블로거 베스트셀러

get_blogger_best

Retrieve bestselling book lists from Aladin Bloggers by category, focusing on domestic titles. Customize results with maxResults and start parameters for targeted searches.

Instructions

알라딘 블로거 베스트셀러 목록을 조회합니다. 국내도서만 조회 가능하며, 카테고리별로 검색할 수 있습니다.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
categoryIdNo카테고리 ID (CID) - 특정 카테고리로 검색을 제한할 때 사용
maxResultsNo최대 결과 개수
startNo검색 시작 번호

Implementation Reference

  • Handler function implementing the logic for 'get_blogger_best' tool: calls Aladin API with QueryType='BlogBest', processes book items into standardized format, handles category filtering, and returns formatted results or error.
    async ({ maxResults, start, categoryId }) => {
      try {
        const params: any = {
          QueryType: 'BlogBest',
          MaxResults: maxResults,
          start: start,
          SearchTarget: 'Book',
          Cover: 'Big'
        };
    
        if (categoryId) {
          params.CategoryId = categoryId;
        }
    
        const result = await callAladinApi('ItemList.aspx', params);
        
        const books: BookSearchResult[] = result.item?.map((item: any) => ({
          title: item.title || '',
          author: item.author || '',
          publisher: item.publisher || '',
          pubDate: item.pubDate || '',
          isbn: item.isbn || '',
          isbn13: item.isbn13 || '',
          cover: item.cover || '',
          categoryName: item.categoryName || '',
          description: item.description || '',
          priceStandard: item.priceStandard || 0,
          priceSales: item.priceSales || 0,
          link: item.link || '',
          pages: item.subInfo?.itemPage || undefined,
          pricePerPage: (item.priceStandard > 0 && item.subInfo?.itemPage > 0) 
            ? parseFloat((item.priceStandard / item.subInfo.itemPage).toFixed(2)) 
            : undefined
        })) || [];
    
        const categoryText = categoryId ? ` (카테고리: ${categoryId})` : '';
        
        return {
          content: [{
            type: 'text',
            text: `📝 블로거 베스트셀러${categoryText} (국내도서만)\n\n검색된 도서 수: ${books.length}권\n\n${JSON.stringify(books, null, 2)}`
          }]
        };
      } catch (error) {
        logger.error(`블로거 베스트셀러 조회 중 오류 발생: ${error}`);
        return {
          content: [{
            type: 'text',
            text: `블로거 베스트셀러 조회 중 오류가 발생했습니다: ${error instanceof Error ? error.message : String(error)}`
          }],
          isError: true
        };
      }
    }
  • Tool schema definition including title, description, and Zod input schema for parameters: maxResults, start, categoryId.
    {
      title: '블로거 베스트셀러',
      description: '알라딘 블로거 베스트셀러 목록을 조회합니다. 국내도서만 조회 가능하며, 카테고리별로 검색할 수 있습니다.',
      inputSchema: {
        maxResults: z.number().min(1).max(100).default(10).describe('최대 결과 개수'),
        start: z.number().min(1).default(1).describe('검색 시작 번호'),
        categoryId: z.string().optional().describe('카테고리 ID (CID) - 특정 카테고리로 검색을 제한할 때 사용')
      }
  • src/index.ts:604-669 (registration)
    Registration of the 'get_blogger_best' tool on the MCP server using server.registerTool, including schema and inline handler.
    server.registerTool(
      'get_blogger_best',
      {
        title: '블로거 베스트셀러',
        description: '알라딘 블로거 베스트셀러 목록을 조회합니다. 국내도서만 조회 가능하며, 카테고리별로 검색할 수 있습니다.',
        inputSchema: {
          maxResults: z.number().min(1).max(100).default(10).describe('최대 결과 개수'),
          start: z.number().min(1).default(1).describe('검색 시작 번호'),
          categoryId: z.string().optional().describe('카테고리 ID (CID) - 특정 카테고리로 검색을 제한할 때 사용')
        }
      },
      async ({ maxResults, start, categoryId }) => {
        try {
          const params: any = {
            QueryType: 'BlogBest',
            MaxResults: maxResults,
            start: start,
            SearchTarget: 'Book',
            Cover: 'Big'
          };
    
          if (categoryId) {
            params.CategoryId = categoryId;
          }
    
          const result = await callAladinApi('ItemList.aspx', params);
          
          const books: BookSearchResult[] = result.item?.map((item: any) => ({
            title: item.title || '',
            author: item.author || '',
            publisher: item.publisher || '',
            pubDate: item.pubDate || '',
            isbn: item.isbn || '',
            isbn13: item.isbn13 || '',
            cover: item.cover || '',
            categoryName: item.categoryName || '',
            description: item.description || '',
            priceStandard: item.priceStandard || 0,
            priceSales: item.priceSales || 0,
            link: item.link || '',
            pages: item.subInfo?.itemPage || undefined,
            pricePerPage: (item.priceStandard > 0 && item.subInfo?.itemPage > 0) 
              ? parseFloat((item.priceStandard / item.subInfo.itemPage).toFixed(2)) 
              : undefined
          })) || [];
    
          const categoryText = categoryId ? ` (카테고리: ${categoryId})` : '';
          
          return {
            content: [{
              type: 'text',
              text: `📝 블로거 베스트셀러${categoryText} (국내도서만)\n\n검색된 도서 수: ${books.length}권\n\n${JSON.stringify(books, null, 2)}`
            }]
          };
        } catch (error) {
          logger.error(`블로거 베스트셀러 조회 중 오류 발생: ${error}`);
          return {
            content: [{
              type: 'text',
              text: `블로거 베스트셀러 조회 중 오류가 발생했습니다: ${error instanceof Error ? error.message : String(error)}`
            }],
            isError: true
          };
        }
      }
    );
  • Shared helper function used by get_blogger_best to make API calls to Aladin's ItemList.aspx with BlogBest query type.
    async function callAladinApi(endpoint: string, params: Record<string, any>): Promise<any> {
      if (!ALADIN_TTB_KEY || ALADIN_TTB_KEY.length === 0) {
        throw new Error('알라딘 API 키가 설정되지 않았습니다. ALADIN_TTB_KEY 환경변수를 올바르게 설정해주세요.');
      }
    
      const baseParams = {
        ttbkey: ALADIN_TTB_KEY,
        output: 'js',
        version: '20131101'
      };
    
      const finalParams = { ...baseParams, ...params };
      const url = `${ALADIN_BASE_URL}/${endpoint}`;
    
      try {
        const response = await axios.get(url, { params: finalParams });
        return response.data;
      } catch (error) {
        logger.error(`알라딘 API 호출 오류: ${error}`);
        throw error;
      }
    }
  • TypeScript interface defining the structure of book search results used in the tool's response processing.
    interface BookSearchResult {
      title: string;
      author: string;
      publisher: string;
      pubDate: string;
      isbn: string;
      isbn13: string;
      cover: string;
      categoryName: string;
      description: string;
      priceStandard: number;
      priceSales: number;
      link: string;
      pages?: number; // 페이지 수 추가
      pricePerPage?: number; // 쪽단가 추가
    }
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 of behavioral disclosure. It mentions that only domestic books are retrievable and category-based search is possible, which adds some behavioral context. However, it lacks details on permissions, rate limits, pagination behavior (implied by 'start' parameter but not explained), error conditions, or what the output looks like. For a read operation with zero annotation coverage, this leaves significant gaps in understanding how the tool behaves.

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 concise with two sentences that efficiently convey key information: what the tool does and its main constraints. It's front-loaded with the primary purpose. There's no wasted text, though it could be slightly more structured for clarity.

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 moderate complexity (3 parameters, no output schema, no annotations), the description is adequate but incomplete. It covers the basic purpose and some constraints, but lacks details on output format, error handling, or deeper behavioral traits. Without annotations or output schema, the agent has insufficient information to fully understand the tool's behavior and results.

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%, with all parameters well-documented in the schema itself (e.g., 'categoryId' for limiting search to a specific category, 'maxResults' for maximum results, 'start' for starting number). The description adds minimal value beyond the schema, only implying category-based search without providing additional syntax or format details. Baseline 3 is appropriate when the 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 action ('조회합니다' - retrieves/views) and resource ('알라딘 블로거 베스트셀러 목록' - Aladdin blogger bestseller list). It distinguishes this tool from siblings like 'get_bestsellers' by specifying it's specifically for 'blogger' bestsellers, though it doesn't explicitly contrast with all alternatives. The purpose is specific but could be more differentiated.

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

Usage Guidelines3/5

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

The description provides some context about when to use it ('국내도서만 조회 가능하며, 카테고리별로 검색할 수 있습니다' - only domestic books can be retrieved, and can search by category), which implies usage scenarios. However, it doesn't explicitly state when to choose this tool over alternatives like 'get_bestsellers' or 'get_editor_choice', nor does it mention any exclusions or prerequisites beyond the domestic book limitation.

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

Related 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/TeeDDub/mcp-aladin-books-server'

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