Skip to main content
Glama
GrpcClient.ts1.55 kB
import { CancellationToken } from "../../Common/CancellationToken.js"; import { ErrorStatusObject, ProtocolBuffer } from "../ProtocolBuffer/ProtocolBuffer.js"; export type GrpcClientRequestProto = string | ProtocolBuffer; export interface GrpcClientRequestUrl { host: string; port?: number; } export interface GrpcClientRequestConfig { deadLine?: number; SSL?: boolean; enableNullValue?: boolean; } export interface GrpcClientRequest { headers?: Record<string, string>; service: string; method: string; body: string; } export type GrpcClientResponse = GrpcClientOKResponse | GrpcClientErrorResponse; export interface GrpcClientOKResponse { ok: true; body: string; } export interface GrpcClientErrorResponse { ok: false; error: ErrorStatusObject; } export interface GrpcResponseAnalyze { time: number; } export interface SendGrpcClientRequest { proto: GrpcClientRequestProto; config?: GrpcClientRequestConfig; address: GrpcClientRequestUrl; request: GrpcClientRequest; } export interface SendGrpcClientResponse { analyze: GrpcResponseAnalyze; response: GrpcClientResponse; } export type ClientOptions = { SSL: boolean; }; export type ClientCallOptions = { deadlineMsec?: number; }; export interface IGrpcClient { callAsync( method: string, request: unknown, headers?: Record<string, string>, options?: ClientCallOptions, token?: CancellationToken, ): Promise<any | ErrorStatusObject>; close(): void; }

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/Yuki4-dev/grpc-mcp'

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