Skip to content

Commit eeba09a

Browse files
Michael Christensenim-michaelc
authored andcommitted
Modularize llm context
1 parent 5c658d0 commit eeba09a

File tree

1 file changed

+15
-30
lines changed
  • src/amazon-keyspaces-mcp-server/awslabs/amazon_keyspaces_mcp_server

1 file changed

+15
-30
lines changed

src/amazon-keyspaces-mcp-server/awslabs/amazon_keyspaces_mcp_server/llm_context.py

Lines changed: 15 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,10 @@ def build_list_keyspaces_context(_keyspaces: List[KeyspaceInfo]) -> str:
3434
),
3535
"limitations": (
3636
"Amazon Keyspaces doesn't support all Apache Cassandra 3.11 features. "
37-
"Unsupported features include materialized views, "
38-
"indexes, aggregate functions like COUNT and SUM, prepared statements "
39-
"for DDL operations, DROP COLUMN, TRUNCATE TABLE, user-defined functions, "
40-
"the inequality operator for user-defined types, or the IN keyword in "
41-
"INSERT and UPDATE statements. Keyspaces uses AWS IAM for authentication "
42-
"and authorization, and not Cassandra's security configuration and "
43-
"commands. Additionally, some operations that are synchronous in Cassandra "
44-
"are asynchronous in Keyspaces, such as DDL operations and range delete "
45-
"operations."
37+
"For the most current list of unsupported features and CQL limitations, "
38+
"refer to the CQL Reference resource (keyspaces://cql-reference) which "
39+
"includes up-to-date information on supported operations, data types, "
40+
"and known restrictions."
4641
),
4742
"replication_strategy": (
4843
"In Cassandra, common replication strategies include SimpleStrategy and "
@@ -69,14 +64,9 @@ def build_list_tables_context(_keyspace_name: str, _tables: List[TableInfo]) ->
6964
# Add table-specific guidance
7065
tables_guidance = {
7166
"data_modeling": (
72-
"In Cassandra, tables are containers for related data, similar to tables "
73-
"in relational databases. However, Cassandra tables are optimized for "
74-
"specific access patterns based on their primary key design. The primary "
75-
"key determines how data is distributed physically in the database, and "
76-
"the attributes that can be specified for efficient query execution. "
77-
"Primary keys consist of a partition key (which determines data "
78-
"distribution) and optional cluster columns which determine how data is "
79-
"ordered within a partition."
67+
"For detailed information on Cassandra data modeling, primary keys, "
68+
"partition keys, and clustering columns, refer to the Developer Guide "
69+
"resource (keyspaces://developer-guide)."
8070
),
8171
"naming_conventions": (
8272
"Table names typically use snake_case and should be descriptive of the "
@@ -285,21 +275,16 @@ def build_amazon_keyspaces_knowledge() -> Dict[str, str]:
285275
"""Provide Amazon Keyspaces specific knowledge."""
286276
knowledge = {
287277
"compatibility": (
288-
"Amazon Keyspaces is compatible with Apache Cassandra 3.11. This means "
289-
"that it supports most of the same CQL language features and is "
290-
"driver-protocol compatible with Cassandra 3.11."
278+
"For current compatibility information with Apache Cassandra, refer to "
279+
"the Developer Guide resource (keyspaces://developer-guide)."
291280
),
292281
"differences_from_cassandra": (
293-
"Amazon Keyspaces doesn't support all Apache Cassandra 3.11 features. "
294-
"Unsupported features include materialized views, indexes, "
295-
"aggregate functions like COUNT and SUM, prepared statements for DDL "
296-
"operations, DROP COLUMN, TRUNCATE TABLE, user-defined functions, the "
297-
"inequality operator for user-defined types, or the IN keyword in INSERT "
298-
"and UPDATE statements. Keyspaces uses AWS IAM for authentication and "
299-
"authorization, and not Cassandra's security configuration and commands. "
300-
"Additionally, some operations that are synchronous in Cassandra are "
301-
"asynchronous in Keyspaces, such as DDL operations and range delete "
302-
"operations."
282+
"For Apache Cassandra features and capabilities, refer to the official "
283+
"Apache Cassandra documentation at https://cassandra.apache.org/doc/. "
284+
"For differences between Amazon Keyspaces and Apache Cassandra, including "
285+
"unsupported features and operational differences, refer to the CQL "
286+
"Reference resource (keyspaces://cql-reference) and Developer Guide "
287+
"resource (keyspaces://developer-guide)."
303288
),
304289
}
305290

0 commit comments

Comments
 (0)