awslabs.lambda-tool-mcp-server 2.0.2__tar.gz → 2.0.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {awslabs_lambda_tool_mcp_server-2.0.2 → awslabs_lambda_tool_mcp_server-2.0.3}/Dockerfile +4 -4
- {awslabs_lambda_tool_mcp_server-2.0.2 → awslabs_lambda_tool_mcp_server-2.0.3}/PKG-INFO +4 -2
- {awslabs_lambda_tool_mcp_server-2.0.2 → awslabs_lambda_tool_mcp_server-2.0.3}/README.md +3 -1
- {awslabs_lambda_tool_mcp_server-2.0.2 → awslabs_lambda_tool_mcp_server-2.0.3}/examples/README.md +1 -1
- {awslabs_lambda_tool_mcp_server-2.0.2 → awslabs_lambda_tool_mcp_server-2.0.3}/pyproject.toml +1 -1
- awslabs_lambda_tool_mcp_server-2.0.3/uv-requirements.txt +26 -0
- {awslabs_lambda_tool_mcp_server-2.0.2 → awslabs_lambda_tool_mcp_server-2.0.3}/uv.lock +4 -3
- awslabs_lambda_tool_mcp_server-2.0.2/.pre-commit-config.yaml +0 -14
- awslabs_lambda_tool_mcp_server-2.0.2/run_tests.sh +0 -173
- {awslabs_lambda_tool_mcp_server-2.0.2 → awslabs_lambda_tool_mcp_server-2.0.3}/.gitignore +0 -0
- {awslabs_lambda_tool_mcp_server-2.0.2 → awslabs_lambda_tool_mcp_server-2.0.3}/.python-version +0 -0
- {awslabs_lambda_tool_mcp_server-2.0.2 → awslabs_lambda_tool_mcp_server-2.0.3}/CHANGELOG.md +0 -0
- {awslabs_lambda_tool_mcp_server-2.0.2 → awslabs_lambda_tool_mcp_server-2.0.3}/LICENSE +0 -0
- {awslabs_lambda_tool_mcp_server-2.0.2 → awslabs_lambda_tool_mcp_server-2.0.3}/NOTICE +0 -0
- {awslabs_lambda_tool_mcp_server-2.0.2 → awslabs_lambda_tool_mcp_server-2.0.3}/awslabs/__init__.py +0 -0
- {awslabs_lambda_tool_mcp_server-2.0.2 → awslabs_lambda_tool_mcp_server-2.0.3}/awslabs/lambda_tool_mcp_server/__init__.py +0 -0
- {awslabs_lambda_tool_mcp_server-2.0.2 → awslabs_lambda_tool_mcp_server-2.0.3}/awslabs/lambda_tool_mcp_server/server.py +0 -0
- {awslabs_lambda_tool_mcp_server-2.0.2 → awslabs_lambda_tool_mcp_server-2.0.3}/docker-healthcheck.sh +0 -0
- {awslabs_lambda_tool_mcp_server-2.0.2 → awslabs_lambda_tool_mcp_server-2.0.3}/examples/sample_functions/customer-create/app.py +0 -0
- {awslabs_lambda_tool_mcp_server-2.0.2 → awslabs_lambda_tool_mcp_server-2.0.3}/examples/sample_functions/customer-id-from-email/app.py +0 -0
- {awslabs_lambda_tool_mcp_server-2.0.2 → awslabs_lambda_tool_mcp_server-2.0.3}/examples/sample_functions/customer-info-from-id/app.py +0 -0
- {awslabs_lambda_tool_mcp_server-2.0.2 → awslabs_lambda_tool_mcp_server-2.0.3}/examples/sample_functions/template.yml +0 -0
- {awslabs_lambda_tool_mcp_server-2.0.2 → awslabs_lambda_tool_mcp_server-2.0.3}/tests/.gitignore +0 -0
- {awslabs_lambda_tool_mcp_server-2.0.2 → awslabs_lambda_tool_mcp_server-2.0.3}/tests/README.md +0 -0
- {awslabs_lambda_tool_mcp_server-2.0.2 → awslabs_lambda_tool_mcp_server-2.0.3}/tests/__init__.py +0 -0
- {awslabs_lambda_tool_mcp_server-2.0.2 → awslabs_lambda_tool_mcp_server-2.0.3}/tests/conftest.py +0 -0
- {awslabs_lambda_tool_mcp_server-2.0.2 → awslabs_lambda_tool_mcp_server-2.0.3}/tests/test_format_lambda_response.py +0 -0
- {awslabs_lambda_tool_mcp_server-2.0.2 → awslabs_lambda_tool_mcp_server-2.0.3}/tests/test_integration.py +0 -0
- {awslabs_lambda_tool_mcp_server-2.0.2 → awslabs_lambda_tool_mcp_server-2.0.3}/tests/test_integration_coverage.py +0 -0
- {awslabs_lambda_tool_mcp_server-2.0.2 → awslabs_lambda_tool_mcp_server-2.0.3}/tests/test_register_lambda_functions.py +0 -0
- {awslabs_lambda_tool_mcp_server-2.0.2 → awslabs_lambda_tool_mcp_server-2.0.3}/tests/test_schema_integration.py +0 -0
- {awslabs_lambda_tool_mcp_server-2.0.2 → awslabs_lambda_tool_mcp_server-2.0.3}/tests/test_server.py +0 -0
- {awslabs_lambda_tool_mcp_server-2.0.2 → awslabs_lambda_tool_mcp_server-2.0.3}/tests/test_server_coverage.py +0 -0
- {awslabs_lambda_tool_mcp_server-2.0.2 → awslabs_lambda_tool_mcp_server-2.0.3}/tests/test_server_coverage_additional.py +0 -0
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
# limitations under the License.
|
|
14
14
|
|
|
15
15
|
#FROM public.ecr.aws/sam/build-python3.10:1.137.1-20250411084548
|
|
16
|
-
FROM public.ecr.aws/sam/build-python3.10@sha256:
|
|
16
|
+
FROM public.ecr.aws/sam/build-python3.10@sha256:d821662474d65f3cf2fc97dba2fa807a3adb580d02895fc4545527812550ea65 AS uv
|
|
17
17
|
|
|
18
18
|
# Install the project into `/app`
|
|
19
19
|
WORKDIR /app
|
|
@@ -31,11 +31,11 @@ ENV UV_PYTHON_PREFERENCE=only-system
|
|
|
31
31
|
ENV UV_FROZEN=true
|
|
32
32
|
|
|
33
33
|
# Copy the required files first
|
|
34
|
-
COPY pyproject.toml uv.lock ./
|
|
34
|
+
COPY pyproject.toml uv.lock uv-requirements.txt ./
|
|
35
35
|
|
|
36
36
|
# Install the project's dependencies using the lockfile and settings
|
|
37
37
|
RUN --mount=type=cache,target=/root/.cache/uv \
|
|
38
|
-
pip install uv && \
|
|
38
|
+
pip install --require-hashes --requirement uv-requirements.txt && \
|
|
39
39
|
uv sync --frozen --no-install-project --no-dev --no-editable
|
|
40
40
|
|
|
41
41
|
# Then, add the rest of the project source code and install it
|
|
@@ -47,7 +47,7 @@ RUN --mount=type=cache,target=/root/.cache/uv \
|
|
|
47
47
|
# Make the directory just in case it doesn't exist
|
|
48
48
|
RUN mkdir -p /root/.local
|
|
49
49
|
|
|
50
|
-
FROM public.ecr.aws/sam/build-python3.10@sha256:
|
|
50
|
+
FROM public.ecr.aws/sam/build-python3.10@sha256:d821662474d65f3cf2fc97dba2fa807a3adb580d02895fc4545527812550ea65
|
|
51
51
|
|
|
52
52
|
# Place executables in the environment at the front of the path and include other binaries
|
|
53
53
|
ENV PATH="/app/.venv/bin:$PATH:/usr/sbin"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: awslabs.lambda-tool-mcp-server
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.3
|
|
4
4
|
Summary: An AWS Labs Model Context Protocol (MCP) server for AWS Lambda Tools
|
|
5
5
|
Project-URL: Homepage, https://awslabs.github.io/mcp/
|
|
6
6
|
Project-URL: Documentation, https://awslabs.github.io/mcp/servers/lambda-tool-mcp-server/
|
|
@@ -61,7 +61,9 @@ From a **security** perspective, this approach implements segregation of duties
|
|
|
61
61
|
|
|
62
62
|
## Installation
|
|
63
63
|
|
|
64
|
-
|
|
64
|
+
[](https://cursor.com/install-mcp?name=awslabs.lambda-tool-mcp-server&config=eyJjb21tYW5kIjoidXZ4IGF3c2xhYnMubGFtYmRhLXRvb2wtbWNwLXNlcnZlckBsYXRlc3QiLCJlbnYiOnsiQVdTX1BST0ZJTEUiOiJ5b3VyLWF3cy1wcm9maWxlIiwiQVdTX1JFR0lPTiI6InVzLWVhc3QtMSIsIkZVTkNUSU9OX1BSRUZJWCI6InlvdXItZnVuY3Rpb24tcHJlZml4IiwiRlVOQ1RJT05fTElTVCI6InlvdXItZmlyc3QtZnVuY3Rpb24sIHlvdXItc2Vjb25kLWZ1bmN0aW9uIiwiRlVOQ1RJT05fVEFHX0tFWSI6InlvdXItdGFnLWtleSIsIkZVTkNUSU9OX1RBR19WQUxVRSI6InlvdXItdGFnLXZhbHVlIiwiRlVOQ1RJT05fSU5QVVRfU0NIRU1BX0FSTl9UQUdfS0VZIjoieW91ci1mdW5jdGlvbi10YWctZm9yLWlucHV0LXNjaGVtYSJ9fQ%3D%3D)
|
|
65
|
+
|
|
66
|
+
Configure the MCP server in your MCP client configuration (e.g., for Amazon Q Developer CLI, edit `~/.aws/amazonq/mcp.json`):
|
|
65
67
|
|
|
66
68
|
```json
|
|
67
69
|
{
|
|
@@ -33,7 +33,9 @@ From a **security** perspective, this approach implements segregation of duties
|
|
|
33
33
|
|
|
34
34
|
## Installation
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
[](https://cursor.com/install-mcp?name=awslabs.lambda-tool-mcp-server&config=eyJjb21tYW5kIjoidXZ4IGF3c2xhYnMubGFtYmRhLXRvb2wtbWNwLXNlcnZlckBsYXRlc3QiLCJlbnYiOnsiQVdTX1BST0ZJTEUiOiJ5b3VyLWF3cy1wcm9maWxlIiwiQVdTX1JFR0lPTiI6InVzLWVhc3QtMSIsIkZVTkNUSU9OX1BSRUZJWCI6InlvdXItZnVuY3Rpb24tcHJlZml4IiwiRlVOQ1RJT05fTElTVCI6InlvdXItZmlyc3QtZnVuY3Rpb24sIHlvdXItc2Vjb25kLWZ1bmN0aW9uIiwiRlVOQ1RJT05fVEFHX0tFWSI6InlvdXItdGFnLWtleSIsIkZVTkNUSU9OX1RBR19WQUxVRSI6InlvdXItdGFnLXZhbHVlIiwiRlVOQ1RJT05fSU5QVVRfU0NIRU1BX0FSTl9UQUdfS0VZIjoieW91ci1mdW5jdGlvbi10YWctZm9yLWlucHV0LXNjaGVtYSJ9fQ%3D%3D)
|
|
37
|
+
|
|
38
|
+
Configure the MCP server in your MCP client configuration (e.g., for Amazon Q Developer CLI, edit `~/.aws/amazonq/mcp.json`):
|
|
37
39
|
|
|
38
40
|
```json
|
|
39
41
|
{
|
{awslabs_lambda_tool_mcp_server-2.0.2 → awslabs_lambda_tool_mcp_server-2.0.3}/examples/README.md
RENAMED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
This directory contains sample Lambda functions that demonstrate different use cases for the MCP server. These functions are designed to be deployed using the AWS SAM CLI.
|
|
4
4
|
|
|
5
|
-
The first two functions (`CustomerInfoFromId` and `CustomerIdFromEmail`) simulate an internal customer
|
|
5
|
+
The first two functions (`CustomerInfoFromId` and `CustomerIdFromEmail`) simulate an internal customer information system where a customer status can be retrieved via a customer ID and the customer ID can be retrieved form the email. In this way, an agent using these two functions as tools can retrieved customer information from an email by invoking the two functions.
|
|
6
6
|
|
|
7
7
|
## Available Functions
|
|
8
8
|
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
#
|
|
2
|
+
# This file is autogenerated by pip-compile with Python 3.10
|
|
3
|
+
# by the following command:
|
|
4
|
+
#
|
|
5
|
+
# pip-compile --generate-hashes --output-file=uv-requirements.txt --strip-extras uv-requirements-0.7.13.in
|
|
6
|
+
#
|
|
7
|
+
uv==0.7.13 \
|
|
8
|
+
--hash=sha256:05f3c03c4ea55d294f3da725b6c2c2ff544754c18552da7594def4ec3889dcfb \
|
|
9
|
+
--hash=sha256:1afdbfcabc3425b383141ba42d413841c0a48b9ee0f4da65459313275e3cea84 \
|
|
10
|
+
--hash=sha256:33837aca7bdf02d47554d5d44f9e71756ee17c97073b07b4afead25309855bc7 \
|
|
11
|
+
--hash=sha256:4efa555b217e15767f0691a51d435f7bb2b0bf473fdfd59f173aeda8a93b8d17 \
|
|
12
|
+
--hash=sha256:4f828174e15a557d3bc0f809de76135c3b66bcbf524657f8ced9d22fc978b89c \
|
|
13
|
+
--hash=sha256:527a12d0c2f4d15f72b275b6f4561ae92af76dd59b4624796fddd45867f13c33 \
|
|
14
|
+
--hash=sha256:5786a29e286f2cc3cbda13a357fd9a4dd5bf1d7448a9d3d842b26b4f784a3a86 \
|
|
15
|
+
--hash=sha256:59915aec9fd2b845708a76ddc6c0639cfc99b6e2811854ea2425ee7552aff0e9 \
|
|
16
|
+
--hash=sha256:721b058064150fc1c6d88e277af093d1b4f8bb7a59546fe9969d9ff7dbe3f6fd \
|
|
17
|
+
--hash=sha256:866cad0d04a7de1aaa3c5cbef203f9d3feef9655972dcccc3283d60122db743b \
|
|
18
|
+
--hash=sha256:88fcf2bfbb53309531a850af50d2ea75874099b19d4159625d0b4f88c53494b9 \
|
|
19
|
+
--hash=sha256:8c0c29a2089ff9011d6c3abccd272f3ee6d0e166dae9e5232099fd83d26104d9 \
|
|
20
|
+
--hash=sha256:9c457a84cfbe2019ba301e14edd3e1c950472abd0b87fc77622ab3fc475ba012 \
|
|
21
|
+
--hash=sha256:9d2952a1e74c7027347c74cee1cb2be09121a5290db38498b8b17ff585f73748 \
|
|
22
|
+
--hash=sha256:a51006c7574e819308d92a3452b22d5bd45ef8593a4983b5856aa7cb8220885f \
|
|
23
|
+
--hash=sha256:b1af81e57d098b21b28f42ec756f0e26dce2341d59ba4e4f11759bc3ca2c0a99 \
|
|
24
|
+
--hash=sha256:e077dcac19e564cae8b4223b7807c2f617a59938f8142ca77fc6348ae9c6d0aa \
|
|
25
|
+
--hash=sha256:f28e70baadfebe71dcc2d9505059b988d75e903fc62258b102eb87dc4b6994a3
|
|
26
|
+
# via -r uv-requirements-0.7.13.in (contents of `uv==0.7.13`)
|
|
@@ -329,13 +329,14 @@ wheels = [
|
|
|
329
329
|
|
|
330
330
|
[[package]]
|
|
331
331
|
name = "h11"
|
|
332
|
-
version = "0.
|
|
332
|
+
version = "0.16.0"
|
|
333
333
|
source = { registry = "https://pypi.org/simple" }
|
|
334
|
-
sdist = { url = "https://files.pythonhosted.org/packages/
|
|
334
|
+
sdist = { url = "https://files.pythonhosted.org/packages/01/ee/02a2c011bdab74c6fb3c75474d40b3052059d95df7e73351460c8588d963/h11-0.16.0.tar.gz", hash = "sha256:4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1", size = 101250, upload-time = "2025-04-24T03:35:25.427Z" }
|
|
335
335
|
wheels = [
|
|
336
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
336
|
+
{ url = "https://files.pythonhosted.org/packages/04/4b/29cac41a4d98d144bf5f6d33995617b185d14b22401f75ca86f384e87ff1/h11-0.16.0-py3-none-any.whl", hash = "sha256:63cf8bbe7522de3bf65932fda1d9c2772064ffb3dae62d55932da54b31cb6c86", size = 37515, upload-time = "2025-04-24T03:35:24.344Z" },
|
|
337
337
|
]
|
|
338
338
|
|
|
339
|
+
|
|
339
340
|
[[package]]
|
|
340
341
|
name = "httpcore"
|
|
341
342
|
version = "1.0.7"
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
repos:
|
|
2
|
-
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
3
|
-
rev: v0.9.6
|
|
4
|
-
hooks:
|
|
5
|
-
- id: ruff
|
|
6
|
-
args: [--fix]
|
|
7
|
-
- id: ruff-format
|
|
8
|
-
|
|
9
|
-
- repo: https://github.com/commitizen-tools/commitizen
|
|
10
|
-
rev: v3.13.0
|
|
11
|
-
hooks:
|
|
12
|
-
- id: commitizen
|
|
13
|
-
- id: commitizen-branch
|
|
14
|
-
stages: [push]
|
|
@@ -1,173 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
|
|
3
|
-
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
4
|
-
#
|
|
5
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
# you may not use this file except in compliance with the License.
|
|
7
|
-
# You may obtain a copy of the License at
|
|
8
|
-
#
|
|
9
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
#
|
|
11
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
# See the License for the specific language governing permissions and
|
|
15
|
-
# limitations under the License.
|
|
16
|
-
|
|
17
|
-
# Script to run the lambda-tool-mcp-server tests
|
|
18
|
-
|
|
19
|
-
# Set the Python path to include the current directory and the parent directory
|
|
20
|
-
export PYTHONPATH=$PYTHONPATH:$(pwd):$(pwd)/..
|
|
21
|
-
|
|
22
|
-
# Check if we're in a virtual environment
|
|
23
|
-
if [ -z "$VIRTUAL_ENV" ]; then
|
|
24
|
-
echo "Warning: You are not running in a virtual environment."
|
|
25
|
-
echo "It's recommended to create and activate a virtual environment before running tests."
|
|
26
|
-
echo "You can create one with: python -m venv venv"
|
|
27
|
-
echo "And activate it with: source venv/bin/activate (Linux/Mac) or venv\\Scripts\\activate (Windows)"
|
|
28
|
-
echo "Continuing without a virtual environment..."
|
|
29
|
-
echo ""
|
|
30
|
-
fi
|
|
31
|
-
|
|
32
|
-
# Always use python -m pytest to ensure we use the correct pytest
|
|
33
|
-
PYTEST_CMD="python -m pytest"
|
|
34
|
-
|
|
35
|
-
# Check if pytest and other dependencies are installed
|
|
36
|
-
echo "Checking for required packages..."
|
|
37
|
-
MISSING_PACKAGES=()
|
|
38
|
-
|
|
39
|
-
# Check for pytest
|
|
40
|
-
python -c "import pytest" 2>/dev/null
|
|
41
|
-
if [ $? -ne 0 ]; then
|
|
42
|
-
MISSING_PACKAGES+=("pytest pytest-asyncio pytest-cov")
|
|
43
|
-
fi
|
|
44
|
-
|
|
45
|
-
# Check for boto3 package
|
|
46
|
-
python -c "import boto3" 2>/dev/null
|
|
47
|
-
if [ $? -ne 0 ]; then
|
|
48
|
-
MISSING_PACKAGES+=("boto3")
|
|
49
|
-
fi
|
|
50
|
-
|
|
51
|
-
# Check for mcp package
|
|
52
|
-
python -c "import mcp" 2>/dev/null
|
|
53
|
-
if [ $? -ne 0 ]; then
|
|
54
|
-
MISSING_PACKAGES+=("mcp")
|
|
55
|
-
fi
|
|
56
|
-
|
|
57
|
-
# Check for pydantic package
|
|
58
|
-
python -c "import pydantic" 2>/dev/null
|
|
59
|
-
if [ $? -ne 0 ]; then
|
|
60
|
-
MISSING_PACKAGES+=("pydantic")
|
|
61
|
-
fi
|
|
62
|
-
|
|
63
|
-
# Install missing packages
|
|
64
|
-
if [ ${#MISSING_PACKAGES[@]} -gt 0 ]; then
|
|
65
|
-
echo "Installing missing packages: ${MISSING_PACKAGES[*]}"
|
|
66
|
-
|
|
67
|
-
# Try pip first (more reliable)
|
|
68
|
-
if command -v pip &> /dev/null; then
|
|
69
|
-
echo "Using pip to install packages..."
|
|
70
|
-
pip install ${MISSING_PACKAGES[*]} -v
|
|
71
|
-
# Try pip3 if pip is not available
|
|
72
|
-
elif command -v pip3 &> /dev/null; then
|
|
73
|
-
echo "Using pip3 to install packages..."
|
|
74
|
-
pip3 install ${MISSING_PACKAGES[*]} -v
|
|
75
|
-
# Try uv as a last resort
|
|
76
|
-
elif command -v uv &> /dev/null; then
|
|
77
|
-
echo "Using uv to install packages..."
|
|
78
|
-
uv pip install ${MISSING_PACKAGES[*]} -v
|
|
79
|
-
else
|
|
80
|
-
echo "Error: No package manager (pip, pip3, or uv) is available. Please install the missing packages manually."
|
|
81
|
-
exit 1
|
|
82
|
-
fi
|
|
83
|
-
|
|
84
|
-
# Verify installation with more verbose output
|
|
85
|
-
echo "Verifying package installations..."
|
|
86
|
-
for pkg in "pytest" "boto3" "mcp" "pydantic"; do
|
|
87
|
-
echo "Checking for $pkg..."
|
|
88
|
-
python -c "import $pkg; print(f'$pkg version: {$pkg.__version__}')" 2>/dev/null
|
|
89
|
-
if [ $? -ne 0 ]; then
|
|
90
|
-
echo "Failed to install $pkg. Trying to install it individually..."
|
|
91
|
-
pip install $pkg -v || pip3 install $pkg -v || echo "Failed to install $pkg. Please install it manually."
|
|
92
|
-
|
|
93
|
-
# Check again
|
|
94
|
-
python -c "import $pkg" 2>/dev/null
|
|
95
|
-
if [ $? -ne 0 ]; then
|
|
96
|
-
echo "Still failed to install $pkg. Please install it manually."
|
|
97
|
-
echo "You can try: pip install $pkg"
|
|
98
|
-
exit 1
|
|
99
|
-
fi
|
|
100
|
-
fi
|
|
101
|
-
done
|
|
102
|
-
fi
|
|
103
|
-
|
|
104
|
-
# Print debug information
|
|
105
|
-
echo "Debug information:"
|
|
106
|
-
echo "Python version: $(python --version)"
|
|
107
|
-
echo "Python path: $PYTHONPATH"
|
|
108
|
-
echo "Current directory: $(pwd)"
|
|
109
|
-
echo "Python executable: $(which python)"
|
|
110
|
-
echo "Pytest module location: $(python -c "import pytest; print(pytest.__file__)" 2>/dev/null || echo "Not found")"
|
|
111
|
-
|
|
112
|
-
# Check if awslabs.lambda_tool_mcp_server module can be imported
|
|
113
|
-
echo "Checking if awslabs.lambda_tool_mcp_server module can be imported..."
|
|
114
|
-
python -c "import awslabs.lambda_tool_mcp_server; print(f'awslabs.lambda_tool_mcp_server module found at: {awslabs.lambda_tool_mcp_server.__file__}')" 2>/dev/null
|
|
115
|
-
if [ $? -ne 0 ]; then
|
|
116
|
-
echo "Warning: awslabs.lambda_tool_mcp_server module cannot be imported. This may cause test failures."
|
|
117
|
-
echo "Installing the package in development mode..."
|
|
118
|
-
|
|
119
|
-
# Check if uv is available
|
|
120
|
-
if command -v uv &> /dev/null; then
|
|
121
|
-
uv pip install -e .
|
|
122
|
-
# Check if pip is available
|
|
123
|
-
elif command -v pip &> /dev/null; then
|
|
124
|
-
pip install -e .
|
|
125
|
-
else
|
|
126
|
-
echo "Neither uv nor pip is available. Creating a symbolic link instead..."
|
|
127
|
-
# Create a symbolic link to the module in the current directory
|
|
128
|
-
ln -sf $(pwd)/awslabs/lambda_tool_mcp_server $(pwd)/lambda_tool_mcp_server 2>/dev/null
|
|
129
|
-
fi
|
|
130
|
-
|
|
131
|
-
echo "Trying again..."
|
|
132
|
-
python -c "import awslabs.lambda_tool_mcp_server; print(f'awslabs.lambda_tool_mcp_server module found at: {awslabs.lambda_tool_mcp_server.__file__}')" 2>/dev/null
|
|
133
|
-
if [ $? -ne 0 ]; then
|
|
134
|
-
echo "Still cannot import awslabs.lambda_tool_mcp_server module. Tests may fail."
|
|
135
|
-
echo "Directory structure:"
|
|
136
|
-
ls -la
|
|
137
|
-
echo "awslabs directory:"
|
|
138
|
-
ls -la awslabs 2>/dev/null || echo "awslabs directory not found"
|
|
139
|
-
fi
|
|
140
|
-
fi
|
|
141
|
-
|
|
142
|
-
# Check if tests directory exists and is not empty
|
|
143
|
-
if [ ! -d "tests" ]; then
|
|
144
|
-
echo "Error: tests directory not found. Make sure you are running this script from the root of the project."
|
|
145
|
-
exit 1
|
|
146
|
-
fi
|
|
147
|
-
|
|
148
|
-
if [ -z "$(ls -A tests)" ]; then
|
|
149
|
-
echo "Error: tests directory is empty. No tests to run."
|
|
150
|
-
exit 1
|
|
151
|
-
fi
|
|
152
|
-
|
|
153
|
-
# List test files
|
|
154
|
-
echo "Test files found:"
|
|
155
|
-
find tests -name "test_*.py" | sort
|
|
156
|
-
|
|
157
|
-
# Run the tests
|
|
158
|
-
echo "Running tests..."
|
|
159
|
-
$PYTEST_CMD -xvs tests/
|
|
160
|
-
|
|
161
|
-
# If pytest fails, try using unittest as a fallback
|
|
162
|
-
if [ $? -ne 0 ]; then
|
|
163
|
-
echo "Pytest failed. Trying to run tests with unittest as a fallback..."
|
|
164
|
-
python -m unittest discover -s tests
|
|
165
|
-
fi
|
|
166
|
-
|
|
167
|
-
# If you want to run with coverage, uncomment the following line
|
|
168
|
-
# $PYTEST_CMD --cov=awslabs.lambda_tool_mcp_server --cov-report=term-missing tests/
|
|
169
|
-
|
|
170
|
-
# If you want to run with coverage and generate an HTML report, uncomment the following line
|
|
171
|
-
# $PYTEST_CMD --cov=awslabs.lambda_tool_mcp_server --cov-report=html tests/
|
|
172
|
-
|
|
173
|
-
echo "Test run completed."
|
|
File without changes
|
{awslabs_lambda_tool_mcp_server-2.0.2 → awslabs_lambda_tool_mcp_server-2.0.3}/.python-version
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{awslabs_lambda_tool_mcp_server-2.0.2 → awslabs_lambda_tool_mcp_server-2.0.3}/awslabs/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{awslabs_lambda_tool_mcp_server-2.0.2 → awslabs_lambda_tool_mcp_server-2.0.3}/docker-healthcheck.sh
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{awslabs_lambda_tool_mcp_server-2.0.2 → awslabs_lambda_tool_mcp_server-2.0.3}/tests/.gitignore
RENAMED
|
File without changes
|
{awslabs_lambda_tool_mcp_server-2.0.2 → awslabs_lambda_tool_mcp_server-2.0.3}/tests/README.md
RENAMED
|
File without changes
|
{awslabs_lambda_tool_mcp_server-2.0.2 → awslabs_lambda_tool_mcp_server-2.0.3}/tests/__init__.py
RENAMED
|
File without changes
|
{awslabs_lambda_tool_mcp_server-2.0.2 → awslabs_lambda_tool_mcp_server-2.0.3}/tests/conftest.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{awslabs_lambda_tool_mcp_server-2.0.2 → awslabs_lambda_tool_mcp_server-2.0.3}/tests/test_server.py
RENAMED
|
File without changes
|
|
File without changes
|