remove_visible_foreign_key
Removes a foreign key from the visible-foreign-keys list for a specific context, either by reference or index, and stages the change until apply_annotations() is called.
Instructions
Remove a foreign key from the visible-foreign-keys list for a specific context.
This is a convenience tool for removing related tables without replacing the entire visible-foreign-keys annotation. Changes are staged until apply_annotations() is called.
Args: table_name: Name of the table. context: The context to modify (e.g., "detailed", "*"). foreign_key: Foreign key to remove. Can be: - List: foreign key reference [schema, constraint] to find and remove - Integer: index position to remove (0-indexed)
Returns: JSON with the updated foreign key list for the context.
Examples: # Remove by foreign key reference remove_visible_foreign_key("Subject", "detailed", ["domain", "Image_Subject_fkey"])
# Remove by position (first foreign key)
remove_visible_foreign_key("Subject", "detailed", 0)
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"table_name": "<table_name>",
"context": "<context>",
"foreign_key": "<foreign_key>"
},
"name": "remove_visible_foreign_key"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| context | Yes | ||
| table_name | Yes | ||
| foreign_key | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |