@aashari/mcp-server-aws-sso
Version:
Node.js/TypeScript MCP server for AWS Single Sign-On (SSO). Enables AI systems (LLMs) with tools to initiate SSO login (device auth flow), list accounts/roles, and securely execute AWS CLI commands using temporary credentials. Streamlines AI interaction w
43 lines (42 loc) • 1.48 kB
TypeScript
/**
* Apply a JMESPath filter to JSON data
*
* @param data - The data to filter (any JSON-serializable value)
* @param filter - JMESPath expression to apply
* @returns Filtered data or original data if filter is empty/invalid
*
* @example
* // Get single field
* applyJqFilter(data, "name")
*
* // Get nested field
* applyJqFilter(data, "body.storage.value")
*
* // Get multiple fields as object
* applyJqFilter(data, "{id: id, title: title}")
*
* // Array operations
* applyJqFilter(data, "results[*].title")
*/
export declare function applyJqFilter(data: unknown, filter?: string): unknown;
/**
* Convert data to JSON string for MCP response
*
* @param data - The data to stringify
* @param pretty - Whether to pretty-print the JSON (default: true)
* @returns JSON string
*/
export declare function toJsonString(data: unknown, pretty?: boolean): string;
/**
* Convert data to output string for MCP response
*
* By default, converts to TOON format (Token-Oriented Object Notation)
* for improved LLM token efficiency (30-60% fewer tokens).
* Falls back to JSON if TOON conversion fails or if useToon is false.
*
* @param data - The data to convert
* @param useToon - Whether to use TOON format (default: true)
* @param pretty - Whether to pretty-print JSON (default: true)
* @returns TOON formatted string (default), or JSON string
*/
export declare function toOutputString(data: unknown, useToon?: boolean, pretty?: boolean): Promise<string>;