Skip to content

Latest commit

 

History

History
247 lines (196 loc) · 20.8 KB

File metadata and controls

247 lines (196 loc) · 20.8 KB

Mcp

Overview

Model Context Protocol endpoint.

Available Operations

McpPost

Send JSON-RPC request to the MCP server over HTTP streaming transport

Example Usage: initialize

using StackOneHQ.Client;
using StackOneHQ.Client.Models.Components;
using StackOneHQ.Client.Models.Requests;

var sdk = new StackOneHQClient();

var res = await sdk.Mcp.McpPostAsync(
    security: new StackoneMcpPostSecurity() {
        Basic = new SchemeBasic() {
            Username = "",
            Password = "",
        },
    },
    jsonRpcMessageDto: new JsonRpcMessageDto() {
        Jsonrpc = "2.0",
        Method = "initialize",
        Params = new Params() {},
        Id = new Id() {},
    },
    xAccountId: "<id>"
);

// handle response

Example Usage: toolsCall

using StackOneHQ.Client;
using StackOneHQ.Client.Models.Components;
using StackOneHQ.Client.Models.Requests;

var sdk = new StackOneHQClient();

var res = await sdk.Mcp.McpPostAsync(
    security: new StackoneMcpPostSecurity() {
        Basic = new SchemeBasic() {
            Username = "",
            Password = "",
        },
    },
    jsonRpcMessageDto: new JsonRpcMessageDto() {
        Jsonrpc = "2.0",
        Method = "tools/call",
        Params = new Params() {},
        Id = new Id() {},
    },
    xAccountId: "<id>"
);

// handle response

Example Usage: toolsList

using StackOneHQ.Client;
using StackOneHQ.Client.Models.Components;
using StackOneHQ.Client.Models.Requests;

var sdk = new StackOneHQClient();

var res = await sdk.Mcp.McpPostAsync(
    security: new StackoneMcpPostSecurity() {
        Basic = new SchemeBasic() {
            Username = "",
            Password = "",
        },
    },
    jsonRpcMessageDto: new JsonRpcMessageDto() {
        Jsonrpc = "2.0",
        Method = "tools/list",
        Params = new Params() {},
        Id = new Id() {},
    },
    xAccountId: "<id>"
);

// handle response

Parameters

Parameter Type Required Description
security StackoneMcpPostSecurity ✔️ The security requirements to use for the request.
JsonRpcMessageDto JsonRpcMessageDto ✔️ JSON-RPC 2.0 message
XAccountId string Account secure id for the target provider account (optional if x-account-id query parameter is provided)
XAccountIdQueryParameter object Account secure id (alternative to x-account-id header)
McpSessionId string Session id; omit for initialize, include for subsequent calls

Response

StackoneMcpPostResponse

Errors

Error Type Status Code Content Type
StackOneHQ.Client.Models.Errors.BadRequestResponseException 400 application/json
StackOneHQ.Client.Models.Errors.UnauthorizedResponseException 401 application/json
StackOneHQ.Client.Models.Errors.ForbiddenResponseException 403 application/json
StackOneHQ.Client.Models.Errors.NotFoundResponseException 404 application/json
StackOneHQ.Client.Models.Errors.RequestTimedOutResponseException 408 application/json
StackOneHQ.Client.Models.Errors.ConflictResponseException 409 application/json
StackOneHQ.Client.Models.Errors.UnprocessableEntityResponseException 422 application/json
StackOneHQ.Client.Models.Errors.TooManyRequestsResponseException 429 application/json
StackOneHQ.Client.Models.Errors.InternalServerErrorResponse 500 application/json
StackOneHQ.Client.Models.Errors.NotImplementedResponseException 501 application/json
StackOneHQ.Client.Models.Errors.BadGatewayResponseException 502 application/json
StackOneHQ.Client.Models.Errors.APIException 4XX, 5XX */*

McpGet

Open a dedicated Server-Sent Events stream for MCP notifications

Example Usage

using StackOneHQ.Client;
using StackOneHQ.Client.Models.Components;
using StackOneHQ.Client.Models.Requests;

var sdk = new StackOneHQClient();

var res = await sdk.Mcp.McpGetAsync(
    security: new StackoneMcpGetSecurity() {
        Basic = new SchemeBasic() {
            Username = "",
            Password = "",
        },
    },
    mcpSessionId: "<id>",
    xAccountId: "<id>"
);

// handle response

Parameters

Parameter Type Required Description
security StackoneMcpGetSecurity ✔️ The security requirements to use for the request.
McpSessionId string ✔️ Session id
XAccountId string Account secure id for the target provider account (optional if x-account-id query parameter is provided)
XAccountIdQueryParameter object Account secure id (alternative to x-account-id header)

Response

StackoneMcpGetResponse

Errors

Error Type Status Code Content Type
StackOneHQ.Client.Models.Errors.BadRequestResponseException 400 application/json
StackOneHQ.Client.Models.Errors.UnauthorizedResponseException 401 application/json
StackOneHQ.Client.Models.Errors.ForbiddenResponseException 403 application/json
StackOneHQ.Client.Models.Errors.NotFoundResponseException 404 application/json
StackOneHQ.Client.Models.Errors.RequestTimedOutResponseException 408 application/json
StackOneHQ.Client.Models.Errors.ConflictResponseException 409 application/json
StackOneHQ.Client.Models.Errors.UnprocessableEntityResponseException 422 application/json
StackOneHQ.Client.Models.Errors.TooManyRequestsResponseException 429 application/json
StackOneHQ.Client.Models.Errors.InternalServerErrorResponse 500 application/json
StackOneHQ.Client.Models.Errors.NotImplementedResponseException 501 application/json
StackOneHQ.Client.Models.Errors.BadGatewayResponseException 502 application/json
StackOneHQ.Client.Models.Errors.APIException 4XX, 5XX */*

McpDelete

Close an existing MCP session for the provided session id

Example Usage

using StackOneHQ.Client;
using StackOneHQ.Client.Models.Components;
using StackOneHQ.Client.Models.Requests;

var sdk = new StackOneHQClient();

var res = await sdk.Mcp.McpDeleteAsync(
    security: new StackoneMcpDeleteSecurity() {
        Basic = new SchemeBasic() {
            Username = "",
            Password = "",
        },
    },
    mcpSessionId: "<id>",
    xAccountId: "<id>"
);

// handle response

Parameters

Parameter Type Required Description
security StackoneMcpDeleteSecurity ✔️ The security requirements to use for the request.
McpSessionId string ✔️ Session id
XAccountId string Account secure id for the target provider account (optional if x-account-id query parameter is provided)
XAccountIdQueryParameter object Account secure id (alternative to x-account-id header)

Response

StackoneMcpDeleteResponse

Errors

Error Type Status Code Content Type
StackOneHQ.Client.Models.Errors.BadRequestResponseException 400 application/json
StackOneHQ.Client.Models.Errors.UnauthorizedResponseException 401 application/json
StackOneHQ.Client.Models.Errors.ForbiddenResponseException 403 application/json
StackOneHQ.Client.Models.Errors.NotFoundResponseException 404 application/json
StackOneHQ.Client.Models.Errors.RequestTimedOutResponseException 408 application/json
StackOneHQ.Client.Models.Errors.ConflictResponseException 409 application/json
StackOneHQ.Client.Models.Errors.UnprocessableEntityResponseException 422 application/json
StackOneHQ.Client.Models.Errors.TooManyRequestsResponseException 429 application/json
StackOneHQ.Client.Models.Errors.InternalServerErrorResponse 500 application/json
StackOneHQ.Client.Models.Errors.NotImplementedResponseException 501 application/json
StackOneHQ.Client.Models.Errors.BadGatewayResponseException 502 application/json
StackOneHQ.Client.Models.Errors.APIException 4XX, 5XX */*