Skip to main content
Glama
BACH-AI-Tools

Indian Stock Exchange API2 MCP Server

ipo

Retrieve comprehensive IPO data from Indian stock exchanges, including upcoming, listed, active, and closed offerings for market analysis.

Instructions

Get latest upcoming, listed, active, closed IPO data.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The "ipo" tool is dynamically registered by FastMCP.from_openapi based on the OPENAPI_SPEC definition, which automatically creates the tool handler.
    mcp = FastMCP.from_openapi(
        openapi_spec=openapi_dict,
        client=client,
        name="indian_stock_exchange_api2",
        version=__version__
    )
    
    
    # 注册请求拦截器,为所有请求添加 RapidAPI headers
    _original_request = client.request
    
    async def _add_rapidapi_headers(method, url, **kwargs):
        """拦截所有请求,添加必需的 RapidAPI headers"""
        # 确保 headers 存在
        if 'headers' not in kwargs:
            kwargs['headers'] = {}
        
        # 添加 RapidAPI 必需的 headers
        if API_KEY:
            kwargs['headers']['X-RapidAPI-Key'] = API_KEY
            kwargs['headers']['X-RapidAPI-Host'] = "indian-stock-exchange-api2.p.rapidapi.com"
        else:
            print("⚠️  警告: API_KEY 未设置,请求可能失败")
        
        # 对于 POST/PUT/PATCH,添加 Content-Type
        if method.upper() in ['POST', 'PUT', 'PATCH']:
            if 'Content-Type' not in kwargs['headers']:
                kwargs['headers']['Content-Type'] = 'application/json'
        
        return await _original_request(method, url, **kwargs)
    
    # 替换 request 方法
    client.request = _add_rapidapi_headers
    
    
    def main():
        """主入口点"""
        print(f"🚀 启动 Indian Stock Exchange Api2 MCP 服务器")
        print(f"📦 版本: {__tag__}")
        print(f"🔧 传输协议: {TRANSPORT}")
        
        print()
        
        # 运行服务器
        
        mcp.run(transport="stdio")
Behavior2/5

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

No annotations provided, so description must carry full behavioral burden. While 'Get' implies read-only, it doesn't confirm safety, disclose rate limits, caching behavior, or what structure/format the IPO data returns (critical given no output schema exists).

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?

Single efficient sentence front-loaded with action and scope. No wasted words.

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?

Lists data categories retrieved but omits return format/structure since no output schema exists. For a read-only data tool with no inputs, adequately describes content but not container (JSON structure, pagination, etc.).

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?

Zero parameters per schema, triggering baseline score of 4. Description correctly implies no filtering capabilities by listing all IPO categories covered.

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?

Clear verb 'Get' and specific resource 'IPO data' with explicit categorization (upcoming, listed, active, closed). Differentiates from siblings like get_stock_data_by_name or historical_data by focusing exclusively on IPO lifecycle stages.

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 explicit guidance on when to use versus other data retrieval tools, nor prerequisites for accessing IPO data. Lacks 'when-not-to-use' or alternative selection criteria.

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/BACH-AI-Tools/bach-indian_stock_exchange_api2'

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