Skip to main content
Glama
ascentkorea

Hubble MCP Server

by ascentkorea

get_graph_info

Retrieve keyword relationship data including nodes, relationships, and distances within a specified hop range from a given keyword.

Instructions

키워드 관계 정보(리스닝마인드의 클러스터 파인더의 결과 조회, 키워드 관계 정보 조회)
모든 키워드는 소문자로 변환하여 요청
args:
    req_param: ClusterParameters, 키워드 관계 정보 조회 요청 파라미터
returns:
    dict[ClusterResponse, Any] | None: 키워드 관계 정보 조회 결과
ClusterResponse 는 아래와 같은 정보를 포함합니다:  

nodes: 조회한 키워드의 앞과 뒤로 2혹은 2hop 거리 안에서 검색된 모든 키워드(노드) 리스트
nodes_count: 키워드(노드) 수
rels: 관계 리스트
rels_count: 관계 수
closeness: 관계에서 키워드가 출현한 위치.
distance: 모든 관계에서 키워드가 출현한 위치.
type: PEOPLE_ALSO_SEARCH_FOR | RELATED_SEARCHES | REFINEMENTS | PEOPLE_ALSO_ASK_FOR  

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
req_paramYes

Implementation Reference

  • The main handler function for the 'get_graph_info' MCP tool. It is decorated with @mcp.tool() and @async_retry. It makes an HTTP POST request to the Hubble API endpoint /cluster with ClusterParameters, sending the API key in headers, and returns the response text.
    async def get_graph_info(
            req_param: ClusterParameters) -> dict[ClusterResponse, Any] | None:
        '''
        키워드 관계 정보(리스닝마인드의 클러스터 파인더의 결과 조회, 키워드 관계 정보 조회)
        모든 키워드는 소문자로 변환하여 요청
        args:
            req_param: ClusterParameters, 키워드 관계 정보 조회 요청 파라미터
        returns:
            dict[ClusterResponse, Any] | None: 키워드 관계 정보 조회 결과
        ClusterResponse 는 아래와 같은 정보를 포함합니다:  
        
        nodes: 조회한 키워드의 앞과 뒤로 2혹은 2hop 거리 안에서 검색된 모든 키워드(노드) 리스트
        nodes_count: 키워드(노드) 수
        rels: 관계 리스트
        rels_count: 관계 수
        closeness: 관계에서 키워드가 출현한 위치.
        distance: 모든 관계에서 키워드가 출현한 위치.
        type: PEOPLE_ALSO_SEARCH_FOR | RELATED_SEARCHES | REFINEMENTS | PEOPLE_ALSO_ASK_FOR  
        '''
        async with httpx.AsyncClient() as client:
            headers = {"X-API-Key": HUBBLE_API_KEY}
            response = await client.post(
                f"{HUBBLE_API_URL}/cluster",
                headers=headers,
                json=req_param.model_dump(),
                timeout=30.0)
            response.raise_for_status()
            return response.text
  • ClusterParameters - Input schema (Pydantic BaseModel) defining the request parameters for get_graph_info: keyword (str), gl (kr/jp), limit (int 1-10000), hop (int 1-3), and orientation (UNDIRECTED/NATURAL/REVERSE).
    class ClusterParameters(BaseModel):
        keyword: str = Field(
            min_length=1,
            title="keyword(str)",
            description="요청 키워드",
        )
        gl: Literal['kr', 'jp'] = Field(
            default='kr',
            title="Geolocation",
            description="국가 코드",
        )
        limit: int = Field(default=1000, ge=1, le=10000, title='limit(int)', description='관계수 limit 욥션')
        hop: int = Field(
            default=2,
            ge=1,
            le=3,
            title="hop(int)",
            description="hop 수",
        )
        orientation: Literal['UNDIRECTED', 'NATURAL', 'REVERSE'] = Field(
            default='UNDIRECTED',
            title="direction",
            description="관계 방향",
        )
        _request_at: str
        _api_key: str
        def __init__(self, **data):
            super().__init__(**data)
            self._request_at = datetime.now(UTC).isoformat(timespec='milliseconds') + 'Z' # yapf:disable
  • ClusterRels - Schema for relationship data in the response, containing closeness, distance, source, target, and type fields.
    class ClusterRels(BaseModel):
        closeness: int = Field(description="""
    해당 type 에서 키워드가 출현한 위치
        """)
        distance: int = Field(description="""
    전체 type 에서 키워드가 출현한 위치
        """)
        source: str
        target: str
        type: str = Field(description="""
    관계 type
    * PEOPLE_ALSO_SEARCH_FOR
    * RELATED_SEARCHES
    * REFINEMENTS
    * PEOPLE_ALSO_ASK_FOR  
        """)
  • ClusterData and ClusterResponse - Response schema for get_graph_info. ClusterData contains nodes list, nodes_count, rels (list of ClusterRels), and rels_count. ClusterResponse extends BaseResponse with request_detail, cost, remain_credits, and data.
    class ClusterData(BaseModel):
        nodes: List[str] = Field(description="키워드(노드) 리스트")
        nodes_count: int = Field(description="키워드(노드) 수")
        rels: List[ClusterRels]
        rels_count: int = Field(description="관계 수")
    class ClusterResponse(BaseResponse):
        request_detail: ClusterParameters = Field(description="요청 받았던 파라미터")
        cost: int = Field(default=0)
        remain_credits: int = Field(default=-1)  # serviceAPI
        data: Optional[ClusterData] = Field(default=None)
  • data_api.py:351-351 (registration)
    Registration decorator @mcp.tool() on line 351 registers 'get_graph_info' as an MCP tool with the FastMCP server instance.
    @mcp.tool()
Behavior4/5

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

In absence of annotations, the description discloses the lowercase normalization of keywords and details the return structure (nodes, rels, etc.). However, it does not mention read-only nature or permissions, which are implied but not explicit.

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

Conciseness3/5

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

The description is verbose with repetition (e.g., '키워드 관계 정보 조회' twice) and includes a docstring format. It is structured but could be more concise.

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

Completeness4/5

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

Without an output schema, the description adequately explains the return fields and types. It covers the main aspects of the tool, though it omits edge cases and interpretation guidance.

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 input schema has detailed descriptions for nested properties, but the top-level 'req_param' lacks a description (0% coverage). The description adds value by specifying the lowercase normalization and explaining the return type, compensating for the schema gap.

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 states that it queries keyword relationship information and cluster finder results, but it does not clearly distinguish from sibling tools like get_keyword_info. The verb and resource are specific but somewhat redundant.

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?

No guidance on when to use this tool versus alternatives. The description only states what it does without providing context about suitable scenarios or when not to use it.

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/ascentkorea/hubble_mcp'

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