Skip to main content
Glama
Long0308

VN Stock API MCP Server

by Long0308

get_api_documentation_urls

Retrieve official documentation links for Vietnamese stock API providers, including guides and GitHub repositories, to facilitate integration and development.

Instructions

Get documentation URLs for API providers. Returns links to official API documentation, guides, and GitHub repositories.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
providerYesStock API provider

Implementation Reference

  • The handler function that implements the core logic of the 'get_api_documentation_urls' tool. It extracts the provider from input arguments, selects the appropriate API sources, and returns a JSON-formatted list of documentation URLs and base URLs.
    private async getAPIDocumentationURLs(args: {
      provider: "vndirect" | "fireant" | "ssi" | "all";
    }) {
      const { provider } = args;
    
      const providersToGet =
        provider === "all"
          ? (Object.keys(API_SOURCES) as Array<keyof typeof API_SOURCES>)
          : [provider];
    
      const docs: any[] = [];
    
      for (const prov of providersToGet) {
        const source = API_SOURCES[prov];
        docs.push({
          provider: prov,
          name: source.name,
          documentationUrls: source.apiDocs,
          baseUrl: source.baseUrl,
        });
      }
    
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(docs, null, 2),
          },
        ],
      };
    }
  • The input schema definition and tool metadata for 'get_api_documentation_urls', including name, description, and inputSchema specifying the 'provider' parameter.
      name: "get_api_documentation_urls",
      description:
        "Get documentation URLs for API providers. Returns links to official API documentation, guides, and GitHub repositories.",
      inputSchema: {
        type: "object",
        properties: {
          provider: {
            type: "string",
            enum: ["vndirect", "fireant", "ssi", "all"],
            description: "Stock API provider",
          },
        },
        required: ["provider"],
      },
    },
  • src/index.ts:228-228 (registration)
    Registration of the tool handler in the switch statement within the CallToolRequestSchema handler, dispatching calls to the getAPIDocumentationURLs method.
    return await this.getAPIDocumentationURLs(args as any);
  • Constant data structure API_SOURCES containing the API documentation URLs and metadata for each provider (vndirect, fireant, ssi), directly used by the tool handler.
    const API_SOURCES = {
      vndirect: {
        name: "VNDirect",
        baseUrl: "https://www.vndirect.com.vn",
        apiDocs: [
          "https://www.vndirect.com.vn/san-pham-to-chuc/apis-white-labeling/",
          "https://dstock.vndirect.com.vn/",
        ],
        description: "VNDirect Securities Corporation API",
      },
      fireant: {
        name: "FireAnt",
        baseUrl: "https://api.fireant.vn",
        apiDocs: [
          "https://api.fireant.vn/",
        ],
        description: "FireAnt API for Vietnam stock market",
      },
      ssi: {
        name: "SSI",
        baseUrl: "https://fc-tradeapi.ssi.com.vn",
        apiDocs: [
          "https://guide.ssi.com.vn/ssi-products/tieng-viet/fastconnect-trading/danh-sach-cac-api",
          "https://github.com/SSI-Securities-Corporation/docs",
        ],
        description: "SSI FastConnect API",
      },
    };
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions the return content ('links to official API documentation, guides, and GitHub repositories') but doesn't cover critical aspects like whether it's a read-only operation, error handling, rate limits, or authentication needs. For a tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

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?

The description is front-loaded and efficient, using two sentences that directly convey the purpose and return value without unnecessary details. Every sentence earns its place by adding value, making it appropriately sized for the tool's complexity.

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 low complexity (1 parameter, no output schema, no annotations), the description is minimally adequate. It covers the purpose and return types but lacks details on behavioral traits and usage context. With no output schema, it doesn't explain return values beyond high-level types, leaving room for improvement in completeness.

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?

The input schema has 100% description coverage, with the 'provider' parameter fully documented in the schema. The description adds no additional parameter semantics beyond what the schema provides, such as explaining the 'all' option or provider specifics. Baseline 3 is appropriate since 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 ('Get documentation URLs') and resource ('for API providers'), specifying what the tool does. It distinguishes from siblings like 'get_api_endpoints' by focusing on documentation links rather than operational endpoints. However, it doesn't explicitly differentiate from all siblings, such as news or stock price tools, though the purpose is distinct enough.

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, context for selecting providers, or compare with sibling tools like 'get_api_endpoints' for operational vs. documentation needs. Usage is implied by the purpose but lacks explicit direction.

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/Long0308/vn-stock-api-mcp'

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